martedì 19 aprile 2016

X++: How to find what projects an object from the AOT exists in (Recursive)

To find out what projects an AOT object exists in, use this script.
It's recursive, than it can find methods or inner nodes too

ProjectNode projectNode;
ProjectListNode projectListNode;

TreeNode treeNode;
TreeNodeIterator treeNodeIterator;

// Object we are searching for
TreeNode tnSearch = TreeNode::findNode(@'\Classes\MHT_DOCF_MasterTable');

void find(TreeNodeIterator _innerTreeNodeIterator)
{
TreeNode innerTreeNode;
;
innerTreeNode = _innerTreeNodeIterator.next();
while (innerTreeNode)
{
if (innerTreeNode.treeNodePath() == tnSearch.treeNodePath())
info(strfmt("Found in shared project %1", treeNode.AOTname()));
find(innerTreeNode.AOTiterator());
innerTreeNode = _innerTreeNodeIterator.next();
}
}

;

projectListNode = SysTreeNode::getSharedProject();
treeNodeIterator = projectListNode.AOTiterator();

treeNode = treeNodeIterator.next();
while (treeNode)
{
projectNode = treeNode;
projectNode = projectNode.loadForInspection();
find(projectNode.AOTiterator());
treeNode = treeNodeIterator.next();
}

Nessun commento:

Posta un commento

AX 2012: The request was aborted: Could not create SSL/TLS secure channel

The error you're encountering, "The request was aborted: Could not create SSL/TLS secure channel," can occur due to various re...