server static void inventReservation(InventTransId _inventTransId,
InventSerialId _inventSerialId,
Qty _qty ,
boolean _unreserve=false)
{
InventUpd_Reservation inventUpd_Reservation;
inventMovement inventMovement;
InventSerial invserial;
inventdim inventDim,iDimNew;
SalesLine salesLine;
;
try
{
ttsbegin;
salesLine = SalesLine::findInventTransId(_inventTransId);
if (!salesline)
throw error('Sales Order Line could not be found !');
invSerial = InventSerial::find(_inventSerialId,salesLine.ItemId);
if (!invSerial)
throw error('Inventory Serial Number could not be found !');
inventDim = salesLine.inventDim();
inventdim.inventSerialId = _inventSerialId;
iDimNew = inventDim::findOrCreate(inventDim);
inventMovement = InventTrans::findTransId(salesLine.InventTransId).inventMovement(true);
inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventMovement,iDimNew,_unreserve ? _qty : -_qty);
inventUpd_Reservation.updateNow();
ttscommit;
}
catch (Exception::Deadlock)
{
retry;
}
}
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
Combo boxes in Dialogs are added by adding a DialogField object with the type of an enum. The enum is then controlling what items you can pi...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
No comments:
Post a Comment