[英]how can i get access path of form in AX2012?
我必須獲得工作空間的地址欄中顯示的表單訪問路徑,或使用x ++的表單幫助文件中顯示的表單。
提前致謝
我不確定是否可以在面包屑中獲取當前路徑,我不知道一種方法。 但是,您可以使用crossref查找使用菜單項的所有實例。 它要求交叉引用是最新的,但這不應該成為問題,因為您只需要運行一次即可。
以下作業構建了可用來打開客戶列表頁面的路徑:static void JobXrefBC(Args _args){#TreeNodeSysNodeType #Properties #AOT TreeNode menuItemNode = TreeNode :: findNode(@“ \\ Menu Items \\ Display \\ CustTableListPage”); TreeNode menuNode; xRefPaths xRefPaths; xRefReferences xRefReferences; TreeNode parentNode; Str路徑;
if(menuItemNode)
{
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();
}
info(path);
}
}
}
}
輸出為:
Accounts receivable > Common > Customers > All customers
Sales and marketing > Common > Customers > All customers
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.