returnSalesLine.InventTransIdReturn = originalSalesLine.InventTransId
protected SalesId getOriginalSalesId(SalesId _returnSalesId) { SalesId ret; SalesLine salesLine; InventTransOrigin inventTransOrigin; select firstOnly RecId from salesLine where salesLine.SalesId == _returnSalesId &&salesLine.InventTransIdReturn != '' join RecId, ReferenceId from inventTransOrigin where inventTransOrigin.InventTransId == salesLine.InventTransIdReturn &&inventTransOrigin.ReferenceCategory == InventTransType::Sales; if (inventTransOrigin) { ret = inventTransOrigin.ReferenceId; } return ret; }
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units.
Join us.