Friday, July 3, 2020

Add custom button to run existing MenuItemButton on Dynamics 365FO and related event handler behaviour

In this example, in AX 2012, we write this code to override process a menu item button in PurchTable form (buttonUpdatePackingSlip) .

clicked()
{   
        //Process Before
        super();

       //Process After
}




In D365FO we could handling with Extension within these steps:
1. Create Extension of PurchTable form, add new button




2. Create new class for handling PurchTable event handler
  

 





3.  Copy Event handler method from new created button on PurchTable



 
4. Paste to the created class



 

5. Update the class


6. Create new class for handling PurchEditLines event handler


7. Copy event handler from form PurchEditLines Extension



 

8. Paste to the class
 
9. View Result