Rename AOT Object
static void RenameAOTObj(Args _args) { #AOT UtilElements utilElements; TreeNode treeNodeObj; str newPe="NT",newName; while select utilElements where utilElements.utilLevel==utilEntryLevel::usr &&utilElements.recordType== utilElementType::Table &&utilElements.name like "ST*" { treeNodeObj = TreeNode::findNode(#TablesPath); treeNodeObj = treeNodeObj.AOTfindChild(utilElements.name); if(treeNodeObj) { newName=newPe+subStr(utilElements.name,3,strLen(utilElements.name)); treeNodeObj.AOTRename(newName);//AX2012
//treeNodeObj.AOTsetProperty("Name","newName");//AX2009 treeNodeObj.AOTcompile(); } } }