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 decode or view the x++ class code created with macro ?

(0) ShareShare
ReportReport
Posted on by

Sample encoded class.

#macro.9TF3V2 

#macro.7NA26 #endmacro
#macro.5YXM2 ; #endmacro#macro.25154 ( #endmacro#macro.QW6M3 ) #endmacro#macro.7352S ; #endmacro
#macro.5TBXG ; #endmacro#B4J7(134CQ, class )#B4J7(6X033, SchoolFeesCheck )#1738(7K3S1, extends )
#134CQ#1738(V220T, RunbaseBatch )#macro.2Q1HY { #endmacro#SNXY(T8HA5, #7K3S1 )#B4J7(U0AJ2, #6X033 )

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi Murugan,

    The macros are interpreted and replaced in compiled coding. There is no way to read it unless you change the actual x++ coding.

    Note that this type of development is not best practice. It causes misunderstanding and is more difficult to troubleshoot when there are bugs reported. Also the compilation time will increase as the compiler needs to replace the macros.

    I don't know why someone would use this method to "protect" coding. Another developer can replace it as.the Macros are also within AX. Using some important business logic in e.g. a .NET dll would be a better approach.

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    I have seen people using such kind of fake encryption (Obfuscation)

    This is really a weak approach to protect code. Most likely your source code provider is using  AXProtect

    It takes few minutes only  to make such code insecure.

  • Community Member Profile Picture
    on at

    Many thanks André & Sohaib.

  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    Here is an example on how to decrypt stuff like that: community.dynamics.com/.../dynamics-ax-encrypted-code-myth

  • Community Member Profile Picture
    on at

    Many Thanks Palle, solved with this method.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Sukrut Parab Profile Picture

Sukrut Parab 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans