Thursday, October 27, 2011

Find On-Hand inventory on given date

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()));
}

2 comments:

  1. Hi Faisal,

    I want to trigger an event on change in On hand Stock physical available, What is the right place to put the code for it?

    ReplyDelete
  2. You should trigger a gun on your head instead

    ReplyDelete

I will appreciate your comments !

How to enable new Microsoft teams - Public Preview!

New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY!  Open Micr...