This post is machine-translated. The original post in german language can be found here.

Get all tables, where a particular property has a specific value

The following job lists all tables where a particular property - in the example the property ModifiedBy is requested - has a specific value.

In macro #Properties you find another possible properties of AOT objects, so you can use the job also to query other properties.

static void findTablesWithSpecificProperty(Args _args)
{
    TreeNode treeNodeTables;
    TreeNode treeNode;
    str prop;
    str properties;

    #aot
    #Properties;

    treeNodeTables = TreeNode::findNode(#TablesPath + #AOTRootPath);
    treeNodeTables = treeNodeTables.AOTfirstChild();

    while(treeNodeTables)
    {
        properties      = treeNodeTables.AOTgetProperties();
        prop = Global::findProperty(properties,#PropertyModifiedBy);

        if(prop == "yes")
        {
            info(treeNodeTables.AOTname());
        }

        treeNodeTables = treeNodeTables.AOTnextSibling();
    }
}
These post applies to following version:
Dynamics AX 2012

Add comment
 
 

 

 
 
 
Posts of the actual month
März 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
25262728293031
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.