How to get Module path to menu items in them in ax 2009?

I need to get path of various menu items that are stored in a table from module

for example ,

menuitem: customer assets

module: customers

then the returned path needs to be:

customer\customerDetails\customer assets.

Thank u guys in advance :slight_smile:

This could actually lookup all the instances where this particular menu item is called from.

You need to specify the type of menu item it is, like display or output menuitem.

static void JobMenuItemPath(Args _args)





TreeNode menuItemNode = TreeNode::findNode(@"\MenuItems\Display\CustTableListPage");

TreeNode menuNode;

xRefPaths xRefPaths;

xRefReferences xRefReferences;

TreeNode parentNode;

Str path;



xRefPaths = xRefPaths::find(menuItemNode.treeNodePath());

while select xRefReferences

where xRefReferences.referencePathRecId == xRefPaths.RecId

&& xRefReferences.Reference == XRefReference::Read


path = SysLabel::labelId2String(menuItemNode.AOTgetProperty(#PropertyLabel));

menuNode = TreeNode::findNode(xRefPaths::findRecId(xRefReferences.xRefPathRecId).Path);

if(menuNode && SysTreeNode::path2ApplObjectType(menuNode.treeNodePath()) == UtilElementType::Menu)


parentNode = menuNode.AOTparent();

while(parentNode && parentNode.treeNodePath() != #MenusPath)


path = SysLabel::labelId2String(parentNode.AOTgetProperty(#PropertyLabel)) + " > " + path;

parentNode = parentNode.AOTparent();