Thursday, March 17, 2022

Enable/ Disable or Hide/ Show new, edit, delete button on form in D365fo

 This is posts shows that how to enable disable or show hide system defined button on Form


FormCommandButtonControl attachButton; public void init() { #SysSystemDefinedButtons

//(This Macro contains all system defined buttons to be used on forms and you can play with

// and you play with all system defined buttons like command button, grid controls etc. super(); attachButton= this.control(this.controlId(#SystemDefinedAttachButton)) as FormCommandButtonControl; attachButton.visible(false); }


  public void init()
    {
        this.form().design().showNewButton(0);
        this.form().design().showDeleteButton(0);
        super();

    }

[ExtensionOf(FormStr(InventBatch))]
public final class P_InventBatchForm_Extension
{
    void run()
    {
        next run();
        inventBatch_ds.allowCreate(false); // Disable System Defined NEW Button
      }

}

ref: - System-defined buttons - Finance & Operations | Dynamics 365 | Microsoft Docs

1 comment:


  1. AXUpdateInstaller.exe generate -runbookid="Dev-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="Dev-runbook.xml"

    AXUpdateInstaller.exe import -runbookfile="Dev-runbook.xml"

    AXUpdateInstaller.exe execute -runbookid="Dev-runbook"

    AXUpdateInstaller.exe execute -runbookid="Dev-runbook" -rerunstep -14

    ReplyDelete