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

Key Updates in Dynamics 365 F&O for Version 10.0.39

Here’s a concise summary of the  platform updates  in  Microsoft Dynamics 365 Finance & Operations version 10.0.39 (March 2024) : 1- Add...