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)

Global Class Duplication

(0) ShareShare
ReportReport
Posted on by 20

Hi Everyone,

 we have AX standard functions like con2str(),real2int() as static methods of the Global class.As these are Static classes we can call them by Scope resolution operator(::). rather than using of Class name(Global) ,Scope resolution operator(::) ,we can directly call the methods of Global Class.Could you please write me the reason How the Global class has got that special feature. 

I have created some logic as per my business requirement ,which I have to use multiple times.So I put that method in Global Class as static method.But customizing the System classes is not suggestible. So, I tried duplicating the  Global Class( as My_Global) and wrote my own static method(as My_method()) and tried to get it as like con2str() but I could not get it. Of course we can avail like My_Global ::My_method() .Could you please suggest me how can get it WITHOUT SCOPE RESOLUTION OPERATOR?.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    The only way to call your method without the class name, is to put it on Global.

    The history of Globals special behavior goes way back to Concorde XAL (the predecessor to AX) and it is controlled by the AX kernel. In D365 you can extend Global and still get the same behavior.

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

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans