This piece of code can help you to find out On-Hand inventory at a particular date.
static void findingOnHandByDate(Args _args)
{
ItemId itemId;
InventDim inventDimCriteria;
InventDimParm inventDimParm;
InventSumDateDim inventSumDateDim;
;
// Specify the item to get onhand info on
itemId = '00005';
//inventDimCriteria.InventColorId = '02';
inventDimParm.initFromInventDim(inventDimCriteria);
inventSumDateDim = InventSumDateDim::newParameters(mkdate(31,12,2009), itemId, inventDimCriteria, inventDimParm);
info(strfmt("PostedQty: %1",inventSumDateDim.postedQty()));
info(strfmt("DeductedQty: %1",inventSumDateDim.deductedQty()));
info(strfmt("ReceivedQty: %1",inventSumDateDim.receivedQty()));
}
Hi Faisal,
ReplyDeleteI want to trigger an event on change in On hand Stock physical available, What is the right place to put the code for it?
You should trigger a gun on your head instead
ReplyDelete