Tuesday, 24 March 2015
X++ Code for Item on hand quantity in AX 2012
static void OnHandQtyDimensionWise(Args _args)
{
InventOnhand inventOnhand;
InventDim inventDim;
InventDimParm inventDimParm;
ItemId itemId = '0001';
InventQty inventQty;
inventDim.InventSiteId = 'CENTRAL';
inventDim.InventLocationId = 'ANNARBO';
inventDim = InventDim::findOrCreate(inventDim);
inventDimParm.initFromInventDim(inventDim);
inventOnhand = inventOnhand::newParameters(itemId,inventDim,inventDimParm);
inventQty = inventOnhand.availPhysical();
info(strFmt('Available: %1 ',inventQty));
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment