Hello!
I have written some code to run it in IL, but I'm able to debug it with AX-Debugger and not at Visual Studio, so I think something goes wrong, but I don't know what.
The Code Starts at this point:
class ANXTMSWayBillComplete extends RunBase (I also tried to run it from a TableMethod)
...
wayBillTable = ANXTMSWayBillTable::find(groupId, true); if(ANXTMSParameters::findOrCreate().completeWayBillIL == NoYes::No) { wayBillTable.completeWayBill(); } else { ANXTMSWayBillCompleteIL::callIL(wayBillTable); }
There I came to line ::callIL
-->
class ANXTMSWayBillCompleteIL { } public static server container callIL(ANXTMSWayBillTable _wayBillTable) { XppILExecutePermission xppILExecutePermission = new XppILExecutePermission(); container result; xppILExecutePermission.assert(); result = runClassMethodIL( classStr(ANXTMSWayBillCompleteIL), staticMethodStr(ANXTMSWayBillCompleteIL, completeWayBillIL),[buf2Con(_wayBillTable,true)]); CodeAccessPermission::revertAssert(); return result; } public server static container completeWayBillIL(container _parmContainer) { ... }
I set a Breakepoint in Method "completeWayBillIL" and get the following Result:
After That, I Have created a Test Job like this:
static void SFERunIl(Args _args) { SFETest sfeTest; container result; ANXTMSWayBillTable wbt = ANXTMSWayBillTable::find("A003415"); ; result = ANXTMSWayBillCompleteIL::callIL(wbt); info(conPeek(result,1)); }
When I Run this Job, I am able to debug the Code on Server within Visual Studio:
I see a Different call in SysDictClass::invokeStaticMethodIL
Is there some Configuration which I don't know about?