Frequent users should notice that some of the Dynamics AX forms have an option to switch to a tree layout. In some cases, especially when there are parent-child relations among records, it is a much clearer way to show the whole hierarchy as compared to a flat list. For example, projects and their subprojects displayed in the Project Details form give a much better overview when switched to a tree layout.
This recipe will discuss the principles of how to build tree-based forms. As an example, we will use the Budget model form, which can be opened from General ledger | Setup | Budget | Budget model. This form contains a list of budget models and their submodels. Although the data is organized using a parent-child structure, currently this form does not have a hierarchy layout. The goal of this recipe is to correct that problem.