Microsoft Dynamics AX 2012 Tables Overview

Visit Website View Our Posts

Dynamics AX’s application object tree (AOT) is a container that stores most of the objects that Dynamics AX uses to provided its functionality. The Data Dictionary folder in the AOT contains the Tables folder.  Tables are the main way to store data in Dynamics AX.

Microsoft Dynamics AX 2012 Tables Overview

AX’s AOT Data Dictionary folder

 AX tables are similar to SQL Server tables in that the data is stored in columns and rows. In fact, when saving changes to an AX table, AX will synchronize these changes with the SQL Server database and in the end create a SQL Server table.

Here we can see the different subfolders of an AX table:

Microsoft Dynamics AX 2012 Tables Overview

AX’s AOT Table

Most of these subfolders look similar to SQL Server objects. We have the “fields” folder which represents the columns in the table and also objects like indexes, full-text indexes, relations and delete actions.  Delete actions can be thought of as SQL delete triggers.

There are other folders which provide additional functionality to AX tables and are not available in standard SQL Server tables. Objects like: Field groups and methods.

Field groups allows the user to create a subset of fields in order to facilitate the retrieval of specific data columns.

Methods provide the capability of adding X++ code to tables. For example, you can add code to recreate SQL Server’s triggers functionality for update and insert methods or to provide more complex routines when deleting data.  The possibilities that methods provide to the functionality of a standard table are limitless.  You can implement complex business rules, validations, lookups, etc.

An AX table is treated as an object and new static methods can be created so that search functions can be implemented. A common example is the find method that is implemented in most of the standard AX tables in the system.  You can also extend the functionality of a standard table method by using inheritance which is a concept used by object oriented programming.

You can access a static method by using two colons after the table name and passing parameters (if required.) The following example searches for an item in the InventTable table and returns the matching record and stores it in the varInventTable variable.


varInventTable = InventTable::find(“abc”);

Variable varInventTable is a variable of type “table” and, as you can see, there is no need to instantiate the table to access its static methods, making it easy to add intrinsic table methods to the tables themselves.

Tables in AX provide way more capabilities than standard SQL Server tables. In future articles we will discuss more of these capabilities, their advantages and, why not, some of their shortcomings too.

This article was written by Eduardo Sicouret, Dynamics Technical Consultant for Tridea Partners. Tridea is a leading Microsoft Dynamics provider.

by Tridea Partners

1 thought on “Microsoft Dynamics AX 2012 Tables Overview”

  1. hi team,
    i want to know how to return the form name in a class using X++ code in msdnAX 2012 Please find the right query to get the name.send me the code please with an example.

    thank you

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Show Buttons
Hide Buttons