Monday, March 15, 2021

How to disable system defined buttons in standard form of d365?

   How to disable system-defined buttons in the standard form of d365?



Right-click on the button and copy the name.



check the Below code.


    FormCommandButtonControl 	newButton;

    #SysSystemDefinedButtons //- standard macro

    // #SystemDefinedNewButton - button name.

    newButton = sender.control(sender.controlId(#SystemDefinedNewButton)) as FormCommandButtonControl;

    newButton.visible(false);

    // Disable in design
    sender.formRun().design().showNewButton(0);
    this.form().design().showNewButton(0);

Keep Daxing!!


No comments:

Post a Comment