Where Dynamics AX really excels is in form creation. It is quite possible for one to be a superior Dynamics AX developer with very little understanding of code. The MorphX Development Environment has been setup that way. In this post, we are going to show how to setup a List and Details form within the Dynamics AX environment.
Scenario: Your users want to be able to view multiple records in a table and edit them at the same time. Enter our hero, the simple list and details form.
What You Need: In order to do this demonstration, you need the free Dynamics AX 2012r2 image provided by Microsoft and on Partner Source.
- First, open up the AOT Development environment (you can google this if you are brand new)
- Click View
Project on the AOT Development menu bar (or just hit [ctrl + p])
- Right-Click on the folder called Private, click New and select Project
- Right-click the form and select Rename and change the name to SimpleListDetailExample. Right-click the SimpleListDetailExample project and click Open in new window.
- Drag the project SimpleListDetailExample so that it is directly opposite of the AOT. Now, we can do drag and drop operations between the AOT and the project window.
- Highlight the Forms node and press New Form from template à Simple List Details. Within the forms node, rename the sample form to
DemoListDetailForm by clicking on rename.
- Drag the DemoListDetailForm from the Forms window to the Project window, so that it will be part of one project. Then, Right-click on the
SimpleListDetailExample project and select Compile. This will compile the current project only which is very handy for rapid development.
- Go to the AOT, expand the Data Dictionary, and expand Tables. Find the CustTable(sys) and drag it to the Data Sources node on the DemoListDetailForm in the SimpleListDetailExample project. The data source is just the tables that the report will use for displaying and writing to data. We can simplify this by using a Query object, which can be built in a graphical interface or we can just drag the tables over ourselves. For simplicity sake, I only have one table here. All forms must have a Data Source.
So, we now have Part 1 finished. Part 2 is coming up next. At this stage, you are mostly getting accommodated with the environment. Some of the nice things that I like about Part 1 is that you get some experience with the development environment and setting up projects, which are very important for Dynamics AX development.
Part 2 can be found here: