Modifying multiple forms dynamically

In the standard Dynamics AX application, there is a class called SysSetupFormRun. Every runtime form inherits that class; therefore the class could be used to override some of the common behavior for all Dynamics AX forms.

For example, form background color could be changed depending on some parameters, some controls could be hidden or added depending on specific circumstances, and so on.

In this recipe, we will modify the SysSetupFormRun class to automatically add an About Microsoft Dynamics AX button to every form in Dynamics AX.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In the AOT, open SysSetupFormRun class, and create a new method with the following code:
    private void addAboutButton() ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.