AOT Find Form [AX 2012]
Updated: November 4, 2010
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Use this form to search for application elements in the Application Object Tree (AOT).
| Tab | Description | ||
|---|---|---|---|
| Name & Location |
| ||
| Date | Use the Date and Modified by fields to narrow down the search. Type dates as DD-MM-YYYY. The Date and Modified by fields accept ranges. | ||
| Advanced | Use the advanced options to further narrow down your search.
| ||
| Filter | Filter search results by adding X++ code to the Source field. The code is evaluated for each application element that is found. The code needs to return a Boolean value of true if the element should be included in the search results; otherwise the code should return false. Do not add a method header. The system automatically adds the following header and passes in these parameter values when the search is run.
boolean FilterMethod(str _treeNodeName,
str _treeNodeSource,
XRefPath _path,
ClassRunMode _runMode)
In the following code example, the TextBuffer::find method searches for the 'select: ' text string starting at a character position returned by the TextBuffer::matchPos method.
TextBuffer textBuffer = new TextBuffer();
textBuffer.setText(_treeNodeSource);
return textBuffer.find('select: ')
&& textBuffer.find('select: ',textBuffer.matchPos()
+ textBuffer.matchLen()));
The following code example searches for table methods that return a container by using the SysMethodInfo and TreeNode classes.
boolean filter = false;
Types retypes;
SysMethodInfo sysMethodInfo;
TreeNode treeNode;
XInfo xinfo = new XInfo();
;
treeNode = new TreeNode();
treeNode = xinfo.findNode(_path);
sysmethodInfo = new SysMethodInfo(UtilElementType::TableInstanceMethod, treeNode.applObjectParentHdl(),_treeNodeName);
retypes = sysMethodInfo.returnType();
if(retypes == Types::Container)
{
filter = true;
return filter;
}
return filter;
|
Note