public static boolean cancelSalesLineDeliveryRemainder(SalesId
_salesId, SalesExternalItemId _revnId)
{
SalesLine salesLine;
boolean ret;
ttsBegin;
// You can use your query to find sales line.
select salesLine
// index salesLineIdx
where salesLine.SalesId == _salesId
&&
salesLine.ExternalItemId == _revnId
&&
salesLine.SalesQty == 1
&&
salesLine.SalesStatus ==
SalesStatus::Delivered;
if (salesLine)
{
//Note don't use SalesUpdateRemain::updateDeliveryRemainder(salesLine, 0, 0) as this method is deprecated in D365 FSCM
ret =
SalesUpdateRemain::construct().updateDeliverRemainder(salesLine, 0, 0, 0);
}
ttsCommit;
return ret;
}
No comments:
Post a Comment