Fetching Data from a Document
Question: We are tracking the Customer’s PO Number and PO Date fields in the Sales Order. To have these values fetched into the Sales Invoice as well, we inserted a Custom Field in the Sales Invoice. However, when we create a Sales Invoice from the Sales Order, the Customer’s PO details are not being fetched.
Answer: When data is fetched from one transaction to another, mapping of the data is based on the field names. If two transactions have fields with the exact same name, then their values are mapped.
For example, if you want the Customer’s PO Number and PO Date to be fetched from the Sales Order to the Sales Invoice, then you should ensure that the Custom Fields added in the Sales Invoice have the exact same field names as in the Sales Order.
Since the names for the Customer’s PO-related fields are the same in the Sales Order and Sales Invoice, when creating a Sales Invoice from the Sales Order, the values in these fields are auto-fetched.