Thursday, October 4, 2012

InventDimGroupSetup in AX2012

Here is a piece of code how you can get to know the dimension is active on your product or not in AX 2012.

static void DimensionTest(Args _args)
    InventTable inventTable;
    InventDimGroupSetup inventDimGroupSetup;
    InventDimGroupFieldSetup inventDimGroupFieldSetup;
    select * from inventTable where inventTable.ItemId == "Test";
    inventDimGroupSetup = InventDimGroupSetup::newInventTable(inventTable);
    inventDimGroupFieldSetup = inventDimGroupSetup.getFieldSetup(fieldNum(InventDim, WMSPalletId));
    info("Its active");

No comments:

Post a Comment