Fetching Data from a Document
Fetching Data from a Document
In the Sales Order, we keep track of the Customer's PO Number and PO Date field. We have added a Custom Field to the Sales Invoice so that these values will also be obtained there. Nevertheless, the customer's PO information is not being collected when we construct a sales invoice from the sales order.
The mapping of the data is done based on the field names when data is fetched from one transaction to another. The values of fields with the exact same name in two transactions are mapped.
For instance, you need make sure that the Custom Fields added in the Sales Invoice have the exact same field name as in the Sales Order if you want the Customer's PO No. and PO Date to be fetched from Sales Order to Sales Invoice.
Order for Sales (default fields)
Sales Invoice (custom fields)
As the names of the fields relating to the customer's PO are the same in the sales order and sales invoice, values in these fields are automatically obtained when constructing the sales invoice from the sales order.