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())); }

1 comment:

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...