Hi all,
I am creating auto sales order posting. using this utility we will post multiple sales order by batch job. I am getting below issue whether i run this batch manually or batch.
I already did Incremental CIL, FullCIL.
and the stranger thing is same class is working fine in one of other ax environment.
any suggession would be helpful.
Error: Stack trace: Invalid attempt to call LedgerVoucherObject.newVoucher running in CIL on the client.

It sounds like either newVoucher() method or the whole LedgerVoucherObject class is set to run on client only. I don’t think it’s the case of the standard application, therefore you should review your customizations of LedgerVoucherObject.
first of all thank for your revert martin.
I have not done any customization in ledgervoucherobject class. i am just calling the standard methods of salesformletter class to post the sales order.
please check my code as below.
Your image shows ING_AutoSalesOrderPosting class calling SalesFormLetter class, but that’s not what the error is about. The problem is related to LedgerVoucherObject class, namely the error message says that newVoucher() can’t be used in CIL.
Therefore please look at LedgerVoucherObject instead of ING_AutoSalesOrderPosting.
Use the debugger if you don’t know where the error is thrown.
Thank you martin. you are correct. someone had changed the runon property from calledFrom to client og LedgerVouchObject Class. thats why i got above error.