Calculated field – Physical inventory for quarantine warehouses


I need a Calculated field – Physical inventory (as per ‘Total Stock on hand’ ) for quarantine warehouses (INVENTLOCATIONTYPE = 1, also known as INVENTLOCATIONTYPE:: Quarantine).I am passing item id as a parameter to get the value.Anyone pls help how can I get the total quarantine (Units).

Thanks advance

You can use InventOnhand class. \Classes\InventOnhand\newItemDim

Hi Kranti,

Thanks for the reply, Im using invent table ,I don’t think invent table has relation with inventdim table . i dont know to join and pass the parameter to the below code tmp.totalquarantine=inventonhand::newitemdim(invnettable.itemid,

thanks advance

InventDimParm inventDimParm;
InventDim inventDimCriteria;

InventOnhand inventOnhand;

inventDimParm.ItemIdFlag = true;
inventDimParm.InventLocationIdFlag = true;
inventDimCriteria.InventLocationId = ‘Quarantine’; // use your quarantine warehouse here
inventOnhand = InventOnhand::newItemDim(InventTable.ItemId, inventDimCriteria, inventDimParm);