X++ job to treverse AOT Tables

static void TreversrAOTTables(Args _args)
{
    #AOT
    Treenode TableNode;
    Treenode Table;

    str TableName;
    str tableConfigKey;
    int i;
    int nodeCount;
    ;
    TableNode = treenode::findNode(#TablesPath);
    // Count of all the forms.
    nodeCount = TableNode.AOTchildNodeCount();
    Table = TableNode.AOTfirstChild();

    for (i=1; i<=nodeCount; ++i)
    {
        TableName = Table.AOTgetProperty("Name");
        tableConfigKey = Table.AOTgetProperty("ConfigurationKey");
        if (tableConfigKey == 'WMSAdvanced')
        {
            info(TableName);
        }

        table = table.AOTnextSibling();

    }


}

Comments

Popular posts from this blog

D365: SSRS Report Development/ Customization

D365: X++ code to add custom lookup on worker to show specific workers team workers only

Error message when you log on to a Microsoft Dynamics AX 4.0 client: "You are not a recognized user of Microsoft Dynamics AX"