Add fields from the Purchase order to Sales order

I made a Purchase Order from a Sales Order (Actions → Create Purchase Document → Create Purchase orders) and now I want the “Quantity Received” and “Quantity Invoiced” fields belonging to Purchase Line to appear in Sales Line.

I made an extension of the table “Sales Line”, in which I try to create such fields using “CalcFormula = Lookup …”

But it didn’t work, since for some reason the fields “Purchase order no.” and “Purch. Order Line no.” appear empty.

How can I link the Purchase Order with the Sales Order? Is there any other way to do this? I’m new to this and i feel lost

Sorry, no programming advice, but rather a way to accomplish your goal without programming.

Using the process you used (Actions > Create Purchase Document > Create Purchase Orders) to create the Purchase Orders will not link the two documents. If you set the Sales Line with a Purchasing Code of Drop Ship or Special Order, when the system creates the Purchase Document it will link the two documents.


The Special Order and Drop Ship process flow is different than the above, so you’ll want to review the process to ensure it still meets your needs. Both can be found in the Req. Worksheet.


When using this process you will have a link between the Sales and Purchase Documents. If using Drop Shipment you will also have a link between the Purchase Receipt and the Sales Shipment, as the package will never enter your facility.

I would encourage reaching out to your partner to step through the process and make sure it meets your needs.

Best code is always no code! :slight_smile:

1 Like