Find / search the AOT for an exact match

巧了我就是萌 提交于 2019-12-13 04:42:08

问题


Is it possible to find (search) in Dynamics AX 2009 for an exact match?

For example, when I am searching in the AOT for "AddressRelationship", I don't want to see DirPartyAddressRelationship in the results.


回答1:


Okay, it took me a while, but I have figured this out, it Is possible.

Adding a breakpoint to the find form shows that it uses a class called SysUtilScanSource to find your string within the AX source code.

In SysUtilScanSource.do() the method match is used to find a match against the specific source code. You can read more about match here;

http://msdn.microsoft.com/en-us/library/aa886279(v=ax.10).aspx

The match method allows you to use expressions.

The expression you require is as follows;

:SPACE

Where SPACE is the character ' '. Sets the match to blanks, tabulations, and control characters such as Enter (new line).

For example:

match("ab: cd","ab cd"); //returns 1 
match("ab: cd","ab\ncd"); //returns 1 
match("ab: cd","ab\tcd"); //returns 1
match("ab: cd","ab cd"); //returns 0 - only the first space is matched

Therefore, in your example you need enter the following string in the "containing text" field;

: AddressRelationship: 

Note that in the above string there are spaces in the following locations;

:SPACEAddressRelationship:SPACE 

Try it. I did, it works a treat.




回答2:


When you do the find, look at "properties" tab at the end of the find form window. This allows you to scale down the search based on properties. I do not believe there is a way to use an exact match but you can narrow your search down using the properties.



来源:https://stackoverflow.com/questions/11056800/find-search-the-aot-for-an-exact-match

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!