How to get the top most layer of an AOT object?


The X++ job below shows the top most layer of an AOT object (in this example it is the Address table).
static void se_topLayer(Args _args)
{
#AOT
int i;
str strAOTObjectPath = #TablesPath + '\\' + tablestr(Address);
TreeNode treeNode = TreeNode::findNode(strAOTObjectPath);
UtilEntryLevel topLayer;
;
for (i = 0; i <= 0xf; i++)
{
if (bitTest(treeNode.applObjectLayerMask(), 1 << i))
{
topLayer = max(topLayer, i);
}
}
print topLayer;
pause;
}

No comments:

Post a Comment

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