Code to Get specified layer object in x++

This Job gets you the list of objects(Forms) which are developed in usr layer. This can be achieved in many possible ways..This job will be time consuming as it uses treenode to find the objects. Also, if you click the object in the info displayed, the corresponding form gets opened.

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(),'', sysinfoaction_formrun::newFormname(treeNode.TreeNodeName(),'',''));
}
treeNode = treeNode.AOTnextSibling();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.