Below code to find all menu items related to form in Axapta. You can try in Job in AOT. Thanks
#AOT
str find = “PurchTable”;
TreeNode root = TreeNode::findNode(#MenuItemsDisplayPath);
TreeNode current;
TreeNodeTraverser trav = new TreeNodeTraverser(root,false);
current = trav.next();
while (current)
{
if ((current.AOTgetProperty(‘ObjectType’) == “Form”) && (current.AOTgetProperty(‘Object’) == find))
info(strFmt(“Found menuitem %1”,current.AOTname()));
current = trav.next();
}
Comments