Display method

I need the code to link the following:

WMSOrderTrans.OrderId

links via InvenTransId to CustPackingSlipTrans.InventTransId

links via PackingSlipId to CustPackingSlipJour so I can display a new field (CustPackingSlipJour .NewDocRef)

Thanks for any help.

select NewDocRef from custPackingSlipJour
exists join custPackingSlipTrans
where custPackingSlipTrans.PackingSlipId == custPackingSlipJour.PackingSlipId
&& custPackingSlipTrans.InventTransId == wmsOrderTrans.inventTransId;

If possible consider the DeliveryDate in the query for more accuracy…

Using existing table methods:

display NewDocRef foo()
{
;
return WMSOrderTrans.custPackingSlipTrans().custPackingSlipJour().NewDocRef;

}

Sorry verified in AX 2012( the method only exists in AX 2009)

Meh. Indeed, I’m so busy with 2009 customers, i have not had the chance to get to know 2012 yet. I really should start tagging my answers “… in AX2009 at least” [;)]

But why not add the methods into the 2012 yourself? [:)]