Wednesday, October 2, 2019

How to hide New and Delete buttons in a form in Dynamics AX/ D365 F&O X++

Below is the simple code I have written in form init() method to hide new and delete button from the user interface.

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

    }




or

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

}

Let me know if you have any questions

@Rahul

2 comments:

  1. If anyone can provide the solution of this thread.

    https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/455311/how-to-hide-system-defined-office-button-systemdefinedofficebutton-from-d365-form

    thanks in advance!

    ReplyDelete

Power Automate vs Azure Logic Apps vs Azure Data Factory: What They Are, When to Use Them, and How to Integrate Non-Microsoft Systems

  In today’s cloud-first, API-driven enterprise landscape, automation and integration have become vital pillars of operational agility. Micr...