D365FO – Get packing slip number and delivery date of a sales line in SQL


This SQL statement gets Packing slip number and date of a sales line

select sl.salesid, sl.LINENUM,   PACKINGSLIPID,DELIVERYDATE
from	salesline sl
join inventtransorigin ito
on	sl.INVENTTRANSID = ito.INVENTTRANSID
join	CUSTPACKINGSLIPTRANS cps
on	cps.inventtransId = sl.inventtransid
and     cps.dataareaid = sl.DATAAREAID
and     cps.partition = sl.partition
where sl.salesid = 'xxxxxxx'

You’ll get this result

Comments