Monday, 7 April 2014

Code for Extracting UserLayerObjects in AX

static void getLayers(Args _args)
{
TreeNode treeNode;
XInfo xInfo = new XInfo();
#AOT;
;

treeNode = xInfo.findNode(#FormsPath);

treeNode = treeNode.AOTfirstChild();
while(treeNode)
{
if (treeNode.applObjectlayer() == utilEntryLevel::usr)
{
info(treeNode.TreeNodeName(),'',Sysinfocation_formrun::newFormname(treeNode.TreeNodeName(),'',''));

}

}
treeNode = treeNode.AOTnextSibling();
}

No comments:

Post a Comment