Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Iterate through AOT tree

Shashi s Profile Picture Shashi s 1,203

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++

This was originally posted here.

Comments

*This post is locked for comments