AX / 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

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 )

Twitter picture

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

Facebook photo

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

Connecting to %s