Dynamics AX 2012 Stack trace Invalid attempt to call client running in CIL on the client

Hi AX Community,

Does anyone know about below error messages: (Happen when process invoice in Sales order)



Please do compile forward for the class SalesFormLetter_Invoice and also do the incremental CIL.

If the issue is still persists do the same for Ledger voucher object class as well



Hi Muthu,

Thanks for your help. I did compile forward for SalesFormLetter_Invoice & LedgerVoucherObject. And AOT > Add-ins > Incremental CIL generation from X++.

But the error still persist when I invoiced the sales order.

Is there any other way I can try?

Thank you so much


Did you find the cause of the issue?

I’m getting the same error.

Looks to me like SalesEditLines\canClose method line 48 call to SysOperationController\checkCloseDialog line 30 is executing in CIL when it shouldn’t.

When it tries to run the method checkCloseDialog on line 30 it will enter SalesFormLetter\validate where part of the validation is done by asking the user through Box.noYes interaction if they would like to continue.

I mananged to get the error to go away with a compile and incremental CIL compile.

Your code calls a client-based method in CIL, which is not supported. Any number of compilation can’t change this fact.

It’s not my code. It’s out of the box AX 2012 R2 CU7 code. Hence my confusion.

Please show us the call stack.