Thursday, November 13, 2014

Application Object Tree in AX

The Application Object Tree (AOT) is the development menu in Axapta. All objects used in the application are stored in the AOT and presented to the developer in a tree organized by object type. Axapta uses a layer technology to store objects. This layers help differentiate the objects in Axapta as a typical Axapta installation is built up using not just the standard objects from Microsoft, but also objects provided by Solution Providers, partners and as those developed by customers themselves.  
When expanding a node in the AOT, the sub nodes at the next level will be cached. This may take a few seconds the first time a node is expanded. You only cache the nodes used. When a cached node is later expanded you will find that it responds far more quickly.  
The AOT is accessed by pressing ctrl+d or clicking the icon  in the top menu. Notice that if you are running a demo installation of Axapta, you will not have access to the AOT. You must have the license codes  and X++ installed.
To create a new object, right-click a node in the AOT and choose new. A red vertical bar next to the object node indicates that the node has not been saved. The red mark is also set when a node is modified. All nodes modified or recently created can be saved by clicking the save all icon  in top of the AOT window.
Objects, fields and methods may be duplicated within the AOT. Methods and fields may also be copied. The copy and duplicate functions are accessed by right-clicking on the node and selecting the desired function. When you duplicate a node, the system will create a copy of the selected node in the AOT prefixed with copyOf. This is especially useful when you want to test a possible modification and would like to preserve the prior state of the object as a fallback should the change not function as desired.  
The AOT also supports drag and drop. When adding controls to forms and reports, it is often much faster to drag the fields used for the controls to the form or the report directly from a data source, rather than create them from scratch.
Regardless of which node you select in the AOT, you will always have access to a context menu by right-clicking the current node. The menu is named SysContextMenu in the AOT and can be found under the Menu node. When browsing the menu from the AOT all menu items available in the Context menu will be listed. Depending on the selected node in the AOT you will have additional menu items available to perform context specific activities, like creating a new object, opening a new window or accessing the tools sub menu Add-Ins. Opening a new window provides a root node based on the current selected node in the AOT. You can open as many windows as needed. This feature can be used while dragging new objects to a form or a report, or simply to have cursors positioned in different places in the AOT.   

1 comment: