This code help to reserve sales line quantity manually.
InventDim inventDim, inventDim1;
InventDimParm inventDimParm;
InventDimParm inventDimParmFixed;
InventUpd_Reservation reserve;
SalesLine
salesLine::find("SO-10000", 1);
//Assign Inventory dimensions
as you need
inventDim1.inventLocationId =
“loc1”;
inventDim =
InventDim::findDim(inventDim1);
inventDimParm.initFromInventDim(inventDim);
inventDimParmFixed.initFromInventDim(inventDim);
reserve =
InventUpd_Reservation::newParameters(
InventMovement::construct(salesLine),
inventDim,
inventDimParmFixed,
InventDimFixedClass::inventDimParm2InventDimFixed(inventDimParmFixed),
-90,//Pass the Quantity needs to be reserved
true);
reserve.parmAllowAutoReserveDim(false);
reserve.updateNow();
No comments:
Post a Comment