Want to post fields from SalesParmLine to CustInvoiceTrans table at the time of Sales Invoice Posting

Hi All,

In Ax2012, i have created some fields in SalesParmLine and i fill it at the timing of Sales Invoice Posting. Now i want to post these fields in the Posted Table CustInvoicveTrans.

Please suggest me where to code for updating these fields in the posting table CustInvoiceTrans at the time of Sales Invoice Posting.

Thanks & Regards

Vijay Raj Nath

You should learn how to use cross references - they would show you where CustInvoiceTrans is used.

SalesInvoiceJournalCreateBase.createJournalLine() looks like the right place.

Hi Martin,

Thanks for your co-ordination.

Yes, i write the code (custInvoiceTrans.fieldName = SalesParmLine.FieldName ) at the same place SalesInvoiceJournalCreateBase.createJournalLine() but it is not posted in the PostingTable (CustInvoiceTrans).

Vijay Raj Nath

Have you generated CIL? If it’s executed in CIL and you haven’t updated it, the behavior didn’t change.

And of course, if some code doesn’t do what expected, you should use debugger to see where the problem is.

Thanks Martin,

you help me to overcome this problem. i was doing the same from 2 days but it was not getting effected. Now as suggested by you i generate the Incremental CIL then its working.

very- very thank you Martin.

Regards

Vijay Raj Nath

Hello Martin. I’ve looked and can not find where the CustInvoiceTrans.CommissCalc field is updated. Could you give me a hint?