
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)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.