Blogging this so that I don’t forget it yet again.
The users logged into a new AX 2012 CU3 environment, and got this error when they tried to run the Purchase Order, the bane of 2012, it would seem!
“Exception has been thrown by the target of an invocation.”
The fix is simple – for every user, go to “Tools > Options > Development > General” and UNCHECK the “Execute business operations in CIL” box.
Presto.
Happy DAXing!




Hi,
I tried this but got an error “error in getting SID”
LikeLike
I have not seen that before. You probably get that making other changes to your options too?
LikeLike
it worked for me, but started giving another error on PO “Voucher No. XXXX already exists”. When I check number sequences, i can’t find the number system is displaying in error! Any help
LikeLike
Thanks a lot .. Worked for me as well
LikeLike
Solebed my issue to. Thanks.
LikeLike
Should have read solved rather than solebed! P
LikeLike
I don’t have the the development option under tools.
LikeLike
Tom, thank you for mentioning that. Yes, I’ve seen that when the users were not privileged. You should get a system administrator to do it for you. Then it will work!
LikeLike
Technically, this is not a solution. It is just a workaround that is masking the real problem. You are just bypassing the CIL compiled code. Ideally, you should trap the CLR exception and try to resolve that. Besides, as you have noted, this option is available only to users who are system admins.
LikeLike
Does the message indicate there is an error in the CIL compiled code, how would you go about fixing this error correctly ?
LikeLike
Yes, it does indicate exactly that, and you need to resolve the code issue ultimately using normal debugging/VS debugging procedures.
LikeLike
Thanks for your reply Janete. I guess I’m confused as to why the code would act differently in interpreted mode than in compiled mode, it’s the same code it’s running isn’t it, just in a different way ?
LikeLike
Do not do this as a solution. This basically disables functionality all over the system. You should debug and solve the actual error.
LikeLike
As you said, Alex, and as I said 06 Nov – but I don’t have an answer to Nick’s 06 Nov question – do you?
LikeLike
Hello Jeneteblake,
When I’m trying to open AX application immediately getting this error on screen and application is going to not responding mode. I have tried to recreate XPPIL folder, but failed (Folder partially created). Finally restarting server will resolve my issue. Seems it’s a strange error in my case.
Thanks.,
Ravi Theja Madisetty
https://techguns,wordpress.com
LikeLike
Thank you for sharing your solution!
LikeLiked by 1 person