web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how to use macro in select statement

(0) ShareShare
ReportReport
Posted on by 30

Dear All,

Can  you please let me know should i use macro in select statement with condition?

Please give more shed on this.

Thanks!

Arpan Sen

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    It depends on what you;'re trying to achieve, which you unfortunately forgot to mention.

    To learn how to use macros in general, refer to my reply in your other thread, How to use Global macro and local macro.

  • Verified answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Arpan.

    AX2012 has a good example of this, have a look in the PriceDiscAdmSearch class in AX, you will see a number of macros used both for conditions as well as field list selections. The macros are declared in the class declaration and then used in the search methods e.g. 'searchInventAllAdditionalRelations'

  • @rp@n Profile Picture
    30 on at

    Thanks Jonathan

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    @rp@n, you keep forgetting to verify answers. Instead of replying with "Thanks Jonathan", please click Yes beside Jonathan's reply (below Did this answer your question?).

  • André Arnaud de Calavon Profile Picture
    301,025 Super User 2025 Season 2 on at

    Hi Arpan,

    Macros do have some benefits and are quite powerful, but note that the compiler is replacing the macros with the actual x++ coding which will have a small performance penalty during the compilation process.

  • @rp@n Profile Picture
    30 on at

    Hi Martin,

    I know, I am not new in this forum. I said thanks because they replied me.

    Arpan

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Yes, despite the fact that you're not new here, you're still forgetting. You even haven't fix this thread. Please review your threads, close all that are already answered and don't forget about it when you get answers in future.

    Also, because you're no newbie, it would be great if moderators such as myself wouldn't have to spend timing fixing titles of all your threads. Please make more effort to do your part in this forum. We try to answer your questions for free and all we ask from you is using the forum in a sensible way.

  • @rp@n Profile Picture
    30 on at

    ok, martin

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans