Building a dynamic form
A standard approach for creating forms in Dynamics AX is to create and store form objects in the AOT. Using this approach, it is possible to achieve a high level of complexity. However, in a number of cases, it is required to have forms created dynamically. In the standard Dynamics AX application we can see that application objects, such as the Table browser form, various lookups, or dialogs, are built dynamically.
In this recipe, we will create a dynamic form. In order to show how flexible it can be, we will replicate the layout of the existing Customer groups form located in the Accounts receivable module. It can be opened from Accounts receivable | Setup | Customers.
How to do it...
Carry out the following steps in order to complete this recipe:
1. In the AOT, create a new class called
CustGroupDynamic
with the following code:class CustGroupDynamic { } public static void main(Args _args) { DictTable dictTable; Form form; FormBuildDesign design; FormBuildDataSource...