Interview Questions

Wednesday, May 14, 2014

Show info when inventory is low in AX 2009

Inventory Managment --Journal-- Item Transection--Profit/Loss-- Line Button--Right click on Quantity-- go in to setup
InventJournalLossProfit--Invent journal Trans Field--Qty


Public void modified()
{
    InventQtyAvailPhysical    availtestqty;
    InventOnhand     InventOnhand;
    inventJournalTrans  inventJournalTransloc;
    inventSum             _inventSum;
        DialogButton            diagBut;
    ;
   super();
   journalFormTrans.fieldModifiedQtyPost();
   select  _inventSum   where _inventSum.ItemId == InventJournalTrans.ItemId && _inventSum.AvailPhysical !=0;
   availtestqty = _inventSum.AvailPhysical + inventJournalTrans.Qty;

   if(availtestqty <= 0)
   {
        info('Inventory is 0 or less');
   }
}

No comments:

Post a Comment