Quantcast
Channel: Dynamics Ax – Shashi's Ax.Net Space
Viewing all articles
Browse latest Browse all 57

Iterate through AOT tree

$
0
0

I came across this piece of code which was required to check the AOT elements for certain things.
This iteration should work fine as long as all the developments done show up in your session.
The best way is to restart the AOS and run it to make sure the utilElements have all new objects

UtilElements e;
UtilEntryLevel utilLevel = global::currentAOLayer();
TreeNode treeNode;
;
while select e
where e.utilLevel == utilLevel
&& !(e.recordType == 37 //SharedProjects
|| e.recordType == 78) //WebListDef
{
//treeNode = xUtilElements::getNodeInTree(e);
treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(e));
//DO SOMETHING WITH THE treeNode HERE.
}


Filed under: Ax 2009, Dynamics Ax, X++ Tagged: Ax 2009, Dynamics Ax, x++

Viewing all articles
Browse latest Browse all 57

Trending Articles