One of my young colleuge needs a query so he can get packingslip line agains vend inoice trans. He was developing some report for procurement and sourcing.
I found my documentation about something similar almost 9 years ago.
But a lot of things change from Ax 2012 to d365 Finance and operations.
Now if you required something similar following query will work.
VendInvoicePackingSlipQuantityMatch vendInvoicePackingSlipQuantityMatch;
VendPackingSlipTrans vendPackingSlipTrans;
select firstonly vendPackingSlipTrans
exists join vendInvoicePackingSlipQuantityMatch
where vendInvoicePackingSlipQuantityMatch.InvoiceSourceDocumentLIne == VendPackingSlipTrans.SourceDocumentLine &&
vendPackingSlipTrans.SourceDocumentLine == vendInvoicePackingSlipQuantityMatch.PackingSlipSourceDocumentLine;