[英]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.