Table CustInvoiceTrans New Fields Updation

Hello All,

I have added some new fields in CustInvoiceTrans and these fields should be updated while generation of invoices. In this way, i was thinking to override the insert method of CustInvoiceTrans Table and update these fields. Is this procedure right or do i need to check anything else. Any information on this will be helpful.

Thanks.

Hi,

Depends on what exactly you are trying to achieve. Usually I would not override insert method.

As you are aware, this table contains details of sales invoice lines which gets copied from sales lines. So for instance if you are trying to copy some data from sales lines, I will write this initFromSalesLine method.

hi,

You can write in the class and call it in the main function and run it accordingly…

As far as me , we don’t override the insert() method.

I hope this would be helpful for you.

i added the updation code in initFromSalesLine and is working fine. Thanks Harish.

Hi Harish,

I am new to Dynamics AX 2012. I have a similar scenario where I have created a field (ABC) in the CustInvoiceTrans table. This field already exists in the Salesline table.

How do I add an updation code in the initFromSalesline where it picks the value of ABC field from the Salesline and adds in the CustInvoiceTrans table whenever a new record is created.

Thanks,

DRahsi

If you still have the issue, Please create a new post and explain your requirement/Issue.