AXAPTA - Invent on hand
Views (1338)
//source: http://microsoft-dynamics-ax-erp.blogspot.com.tr/2012/07/find-inventonhand-in-axapta-x.html
static InventOnHand findOnHandByLocationId(ItemId _itemId, InventLocationId _inventLocationId)
{
InventDim inventDim;
InventDimParm inventDimParm;
InventOnHand inventOnHand = new InventOnHand();
;
//Take a combination of dimension , against which you want to find the stock
inventDim.InventLocationId = _inventLocationId;
//Set the flag for the selected dimensions as active
inventDimParm.initFromInventDim(inventDim);
//Initialize the inventSumDateDim with Date,item,dimension and dim parameter
inventOnHand = InventOnHand::newParameters(_itemid,
inventDim,
inventDimParm);
return inventOnHand;
}
static InventOnHand findOnHandByLocationId(ItemId _itemId, InventLocationId _inventLocationId)
{
InventDim inventDim;
InventDimParm inventDimParm;
InventOnHand inventOnHand = new InventOnHand();
;
//Take a combination of dimension , against which you want to find the stock
inventDim.InventLocationId = _inventLocationId;
//Set the flag for the selected dimensions as active
inventDimParm.initFromInventDim(inventDim);
//Initialize the inventSumDateDim with Date,item,dimension and dim parameter
inventOnHand = InventOnHand::newParameters(_itemid,
inventDim,
inventDimParm);
return inventOnHand;
}
This was originally posted here.

Like
Report
*This post is locked for comments