Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

The best way to find a specific method in Dynamics AX 2009

Posted on by Microsoft Employee

Probably somebody knows an efficient way to find a specific method. I know only 2 ways to find interesting method:
1. To call Find(crl+f) in AOT - this is a long way to find something. (see pic1)
2. To call the context menu on the selected method and choose "view definition". (see pic2)
Please help me detect the best way to find a specific component in AOT.

pastedimage1570520686843v3.png

pic1

pastedimage1570520422812v2.png

pic2

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: The best way to find a specific method in Dynamics AX 2009

    [tag:UserList] isn't a variable - it's s macro.

    Also, its not a definition of a macro. A macro can be defined in AOT (therefore you won't ever find its definition in code) or in code, but the syntax is different: typically #define.UserList(...) (although it's not the only possible way.

    Therefore the first problem is that you're looking for a wrong thing. And you said you're looking in your project, but the macro may be defined somewhere else.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The best way to find a specific method in Dynamics AX 2009

    Nikolaos, I found this macro. It was on the AOT\Macro\MacroName. Your answer was full.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The best way to find a specific method in Dynamics AX 2009

    Thank you for description and recommendations. I tried to search a place where was defined this variable #UserLIst, but without success. Also, I used slow search ctrl+F, but only find source code. I can't find a place where was defined this macro. Did I miss something?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: The best way to find a specific method in Dynamics AX 2009

    # indicates it's a macro. Either it's defined in the class where it's used, or in its parent class. Or in Macros node in AOT - in which case this AOT macro is mentioned in your code.

    For example if you put #AOT in beginning of your method you can refer to any value inside the #AOT macro.

    Also, you can search for text in the codebase but it's very slow. Try ctrl-F. However so far all your questions have been about scenarios where we could recommend a better solution than using that slow search.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The best way to find a specific method in Dynamics AX 2009

    I mean is a search variable in the code on the whole project. At this moment, for example, I am trying to find a variable #UserList. I want to find a place where this variable was defined.

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: The best way to find a specific method in Dynamics AX 2009

    "Search on AOT" is too wide question in my opinion. You may want to find elements, other nodes, property values, code etc., based on name, relation, inheritance hierarchy, layer and so on and so on. And you'll use a different approach in each case. It would help if you made your question more specific.

    The AOT search form AX 2009 even allow inserting a piece of X++ code running against nodes...

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: The best way to find a specific method in Dynamics AX 2009

    As mentioned, the cross references tool is very useful. Normally you start your search from something (an object that you already know. "Where is this used?"), and that's a scenario where you can use cross references.

    I don't remember when I would have wanted to search the whole AOT with a keyword.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: The best way to find a specific method in Dynamics AX 2009

    As I understand the best way to find something(method) in the whole solution is to use internal tools for search. I used crl+F on AOT. Our server was overloaded and worked slow. Now the hardware was updated and the searching tool is working faster. But It would be great to find some other tool for search on AOT. Probably the internal search system in AX2009 efficient and another tool useless?

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: The best way to find a specific method in Dynamics 365

    No, let's keep the thread here, we can still use it to discuss your question, if it's not answered. It was just a bit of confusion.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: The best way to find a specific method in Dynamics 365

    You should be able to edit the title by clicking Actions - Edit on your first message.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans