How To remove The Reservation from any open order?
to remove the reservation from any open order to use those items after remove the reservation this code below can help :
Note : you can write this code in Jop Or inside any events like click event .
void UnreserveOpenOrders()
{
// This is the table variable
SalesLine _salesLine;
InventQty _InventQty;
;
select forupdate _salesLine
where ( _salesLine.SalesStatus ==SalesStatus::None || _salesLine.SalesStatus ==SalesStatus::Backorder);
while (_salesLine)
{
if(_salesLine.RemainSalesPhysical > 0)
{
try
{
// un reserve all the remaining quantity
this.SalesReserveQty(_salesLine,_salesLine.RemainSalesPhysical);
}
catch
{
info(_salesLine.ItemId);
}
}
next _salesLine;
}
}
Comments
where "this" come from?