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