On Codeunit 74, we added a new code in the function - CreateInvLines(.....)
PurchHeader."Your Reference" := PurchRcptHeader."Order No.";
and on Codeunit 90, we added the code to assign Your Reference Value to PurchInvHeader.Order No.
But we are getting the following error when posting,
An attempt was made to change an old version of a Purchase Header record. The record should first be reread from the database. This is a programming error.
Identification fields and values: