Hello all,
In my Dynamics AX 2012 R2, I have two axmodels X& Y.
X has class xclass, while Y has class yclass.
xclass has method xmethod, while yclass has method ymethod.
Now I remove (delete) model Y from the AX environment.
Then I inserted a check inside xmethod (model X) that:-
- if model Yis installed then,
- from xmethod in xclass, i am calling yclass constructor and calling ymethod thereafter.
- if model Y is not present then,
- from xmethod in xclass, i am printing "hello world".
Now, my issue is, once model Y is removed and I give a full compile, a compilation error comes up with message 'variable ymethod has not been declared' and/or'yclass is not a class'.
Please help. Is there any way to achieve this? I guess its a fundamental concept and I am missing out on something.