I'm trying to post Sales order and I want one of the fields in sales order posted to the G/L entry. I don't see reference for the General Journal Line table (in PostGLAndCustomer function) in codeunit 80 to assign that field value from sales order table. How can we assign sales order field value to the general journal line field?
You need to subscribe to table 81 to function "OnAfterCopyGenJnlLineFromSalesHeader(SalesHeader,Rec);"
I don't have event type OnAfterCopyGenJnlLineFromSalesHeader inside table 81. Is there an alternative?
There is a CopyFromSalesHeader function in table 81
Where can I use CopyFromSalesHeader to assign a field from Sales header to General Journal line?
You can add your code inside the CopyFromSalesHeader function.
I have added GenJnlLine.OriginalDocNo := SalesHeader.OriginalDocNo inside the function but I still see the Original Doc No as blank in G/L entry.
It worked. Thank you.
Business Applications communities