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));
if(inventDimGroupFieldSetup.isActive())
info("Its active");
}
No comments:
Post a Comment