Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

creating AOT object from code

$
0
0

In the next sampe I'm creating AOT object from code, it works fine, But I don't get the label in the AOT, It is always the translated text. any suggestions?

both green lines get the translated label and not the ID

 

#Properties

str label;

#define.priv('\\Security\\Privileges')

MenuFunction menuFunction = new MenuFunction(_args.menuItemName(), _args.menuItemType());

TreeNode priviligeNode = TreeNode::findNode(#priv);

TreeNode roleNode = PriviligeNode.AOTfindChild(strFmt('%1View',menuFunction.name()));

roleNode = PriviligeNode.AOTadd(strFmt('%1View',menuFunction.name()));

roleNode.AOTsetProperty(#PropertyLabel, menuFunction.label());

roleNode.AOTsetProperty(#PropertyDescription,  "@SYS53654");

roleNode.AOTsave();


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>