How to get active Dimension for Item in Ax 2012

Here I have Created job for get active dimension for item in Ax 2012.

static void ActiveDimension(Args _args)
{
    InventTable     inventTable;
    InventDimParm   inventDimParm;
    ;
    inventTable   = InventTable::find('ItemId');
    inventDimParm =  InventDimParm::activeDimFlag(InventDimGroupSetup::newInventTable(inventTable));
    if(inventDimParm.InventBatchIdFlag)
    {
        info("BatchIdFlag Enabled");
    }
    if(inventDimParm.WMSPalletIdFlag)
    {
        info("Pallet Enabled");
    }
    if(inventDimParm.ConfigIdFlag)
    {
        info("Configuration Enabled");
    }
    if(inventDimParm.InventColorIdFlag)
    {
        info("Color Enabled");
    }
    if(inventDimParm.InventSerialIdFlag)
    {
        info("Serial Id Enabled");
    }
    if(inventDimParm.InventStyleIdFlag)
    {
        info("Style Enabled");
    }
    if(inventDimParm.InventSizeIdFlag)
    {
        info("Size Enabled");
    }
}

Related Posts

Previous
Next Post »

Thanks for comments.....