I'm looking at SalesOrderHeaderV2/SalesOrderLinesV2 and SalesInvoiceHeaderV2/SalesInvoiceLinesV2. I'm trying to work out if I can link a Sales Invoice Line back to the Sales Order Line that gave rise to it.
The InvoiceHeader contains the Sales Order Reference. Sales Invoice Lines contains a field "LineCreationSequenceNumber" but it's not clear if this is the same LineCreationSequence number in the original sales order, or one on the invoice itself (I seem to recall purchase orders have fields for both the PO line and the Req line that it came from).
I'm attempting to append the LineSequence number to the SalesOrderNumber on both sides in the vain hope I can give a Power BI report that can track payments against sales order lines all the way back :-)
Any ideas if i'm attempting the impossible?