Sunday, 1 April 2018

Override form data source field methods in AX7 / D365

In Ax2012 we have commonly customize datasource field methods like jumpRef() or modified(). In AX7 / D365 on extended forms we cannot override datasource field methods. Recommended approach in AX7 / D365 is to avoid overlaying and use extensions as much as possible so for achieving it follow below given steps. In this example I am overriding jumpRef() method on field.

Step: 1
Initialize event handler of the datasource in which you want to override datasource field method. In my case I am using PurchLine_OnInitialized event handler as shown in image.










Step: 2
Then create a method in which you want to give your implementation details and subscribe it to OnInitialized event.















Using this approach we can override any data source field method.

Note: (Custom objects used in this example)

1- EgxPackingInstructionEventHandler (Event handler class)
2- EgxPackingCode_OnJumpRef (Method that provide the jumpRef Implementation)
3- EgxPackingInstructionMenu (Custom form display menu item)

Reference: AX 7. How to override form data source field methods without overlaying.

No comments:

Post a Comment

Set up Online VM for Dynamics 365 Finance and Operation for Technical and Functional Learning Purposes

In this blog, I will discuss how we set up an online VM for D365F&O for Technical and Functional learning purposes for free. Step: 1 Cl...