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.
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.
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.