Wednesday, 11 April 2018

How to check how many tables are there in AX

Sometimes people want to know how many tables exist in an AX environment. Since different environments can vary in regards to the number of tables there can be due to customizations and 3rd party software, below is  the job you can copy and paste in a job and run.

In the code, you can modify the '\\' string to do something like count forms '\\Forms' or EDTs '\\Data Dictionary\\Extended Data Types'

I'm aware of the #TablesPath (in #AOT) being used instead of the '\\Data Dictionary\\Tables' string but I wanted to keep this example simple and straight forward.



static void daxCountTablesInAX(Args _args) { // Count of all the tables. info (strFmt("Tables in AX: %1", treenode::findNode('\\Data Dictionary\\Tables').AOTchildNodeCount())); }

No comments:

Post a Comment

Sorting data in a form datasource in Dynamics Ax 2012 / D365F&O X++

In Microsoft Dynamics AX, you can sort a form datasource when the form is loaded. On the form, override the init method. After the call...