Searching for an object in a development project
In Dynamics AX, any development changes to the application normally have to be organized in development projects. The same object could belong to one or more projects, but Dynamics AX does not provide an easy way to determine this.
In this recipe, we will create a class for searching the development projects. The class is only for demonstration purposes but could easily be converted to a standalone tool or integrated into the right-click menu.
How to do it...
Carry out the following steps in order to complete this recipe:
1. In the AOT, create a new class with the following code:
class DevProjectSearch { } private boolean findChildren( TreeNode _parent, UtilElementType _type, IdentifierName _name) { TreeNode child; TreeNodeIterator iterator; #TreeNodeSysNodeType iterator = _parent.AOTiterator(); child = iterator.next(); while (child) { if (child.treeNodeType().id() == #NT_PROJECT_GROUP) { return this.findChildren(child, _type, _name); } else...