I want to add functionality that inserts the Sales Shipment Header field 'Your Reference' as a text line in the Sales Invoice, before the Sales Shipment Lines are inserted. I am using R295 Combine Shipments or the function 'Get Receipt Lines from the invoice card.
In order to do this without modifying the standard object T111 Sales Shipment Line, I would like to use an event from this table:
In a CodeUnit, I wrote below code. However, this gives me the error 'Record in Table Sales Line already exists: Line No.=10000.
I guess I'm doing something wrong here (besides not hiring a skilled developer
), but what?