Skip to main content

Notifications

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

What are maps and macros? Why we use maps and macros?

(0) ShareShare
ReportReport
Posted on by 208
I needed to understand the concept of these terms in d365fo x++, and where we can use them?
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,846 Most Valuable Professional on at
    What are maps and macros in d365fo ?why we use maps and macros in d365fo?
    It's not which maps are you interested in. There are table maps, such as SalesPurchLine, that allow using common logic for multiple tables (such as both SalesLine and PurchLine). And there is also a collection class called Map.
     
    A macro basically allows you to name a piece of code and then insert it in your code. Their main purpose in X++ used to be to define constants, but you shouldn't do that anymore, because X++ now has 'const' keyword for this purpose.

    (I moved the question from the AX forum here and removed d365fo from the title, because this whole forum is about D365FO and there is no need to repeat it in titles.)

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans