Modify AOT items properties via code x++

TreeNode    objTreeNode;
 
objTreeNode = TreeNode::findNode(@"\Menu Items\Display\");
 
if (objTreeNode)
{
    objTreeNode = objTreeNode.AOTfirstChild();
    /*
    change objTreeNode object properties
    */
    while (objTreeNode)
    {            
        objTreeNode.AOTsetProperties("PROPERTIES\n ViewUserLicense  #" + 'TASK' + "\n  MaintainUserLicense  #" + 'TASK' + "\n ENDPROPERTIES\n");
        objTreeNode.AOTsave();
        objTreeNode = objTreeNode.AOTnextSibling();
    }
}

source : http://dotnetxperience.blogspot.com/2012/10/modify-aot-items-from-code-ax-2012.html

Advertisements

One thought on “Modify AOT items properties via code x++

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s