map customized field in purchline to vendinvoicetrans


I have added one customized field(ABC) in PurchLine. AX2012 R3

After posting invoice, I want that customized field(ABC) value from PurchLine to customized field(ABC) of VendInvoiceTrans table .

Can anyone help me how I can achieve it, where should I have to do mapping for the customized filed.

Thanks you.

Hello Bhanu,

there is initFromPurchLine method in vendinvoiceTrans table, try with that.

I tried, did not work.

Hello Bhanu,

there is one post here related to this,

in which may be below comment can help you

Add methods to initialize your fields from the VendDocumetnLineMap to the class VendDocumentLineType and call them in the \Classes\VendDocumentLineType\initFromPurchLine method.