Thursday, October 27, 2011

Check Active Inventory Dimension

In recent time I came across with a requirement how to find out an active inventory dimension associated with an item.

Here is a sample job to do this task;

static void checkInventDimActive(Args _args)
{
ItemId itemid = "1000";
;

info(strfmt("%1", InventDimSetup::find(InventTable::find(itemid).dimGroupId, fieldNum(InventDim, configId)).Active));
}