I am working on AX 2012 R2 CU7. I am stuck up in the below issue:
I have a method called ‘AAA’ on table level[SMAServiceOrderTable]. Now when I am calling Service Order service from outside AX to create Service Order in AX, I want to execute the logic inside ‘AAA’ when the Service Order service is called.
Question; Where can I call this ‘AAA’ method from so that this method will be called when the Service Order Service is called. I tried to call this method from “prepareForSave” method on AxdServiceOrder class but no success.
Can anyone please help me out on the above issue. As there is little urgency, I would really appreciate if someone can help me out at the earliest.
Would really appreciate for a quick help. Thanks in advance.
You can call it from any method in the document class where it makes sense. prepareForSave() surely is called by the framework if the document is being saved. If you call a right operation, you’ll have to do at least basic debugging; saying “but no success” is not a description of a problem that we can deal with. The debugger will help you with this task (don’t forget that services run in CIL, therefore you have to use the Visual Studio debugger).
Your question is not about a table method, so you’re off-topic here. Please create a new thread and properly describe your problem there. And if you believe that we can read your mind and know what “an error” exactly means, you’ll be disappointed. Giving us all details you have would be a wiser approach.