AX / D365FO – How to find relation between Invoice and Packingslip

Are you trying to find the link between customer invoice and delivery note?

This SQL query will show you how

select b.PACKINGSLIPID packingSlip, c.invoiceId invoiceid, QUANTITY
from CUSTINVOICEPACKINGSLIPQUANTITYMATCH a
join CUSTPACKINGSLIPTRANS b
	on a.PACKINGSLIPSOURCEDOCUMENTLINE = b.SOURCEDOCUMENTLINE
join CUSTINVOICETRANS c
	on a.INVOICESOURCEDOCUMENTLINE = c.SOURCEDOCUMENTLINE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s