Search This Blog

Tuesday, March 20, 2018

AX2009 How to get Item default order settings ...

static void ItemDefaultDimensions(Args _args)
{
    InventTable                 inventTable = inventTable::find('000367');
    InventItemOrderSetupType    setupType   = InventItemOrderSetupType::Sales;
    InventDim                   inventDim;
    ;

    inventDim.InventSiteId = inventTable.inventItemOrderSetupMap(setupType).inventSiteId('2', inventTable);

    inventDim.InventLocationId  = inventTable.inventItemOrderSetupMap(setupType,InventDim::findOrCreate(inventDim).InventDimId).inventLocationId(inventDim.InventLocationId,inventTable,'2');
                                                                                                                                       
    inventDim.ConfigId = inventTable.StandardConfigId;

    inventDim = InventDim::findOrCreate(inventDim);

    info(strFmt('Dim.  %1', inventDim.inventDimId));
    info(strFmt('Site  %1', inventDim.InventSiteId));
    info(strFmt('Warehouse  %1', inventDim.InventLocationId));
}

1 comment:

  1. Hi there! I was just wondering if you could answer my question regarding cloud software development? How does it really work and is it worth the price of the entire service if you want to outsource it?

    ReplyDelete