Get default site and warehouse of item In D365fo.
Check below job.
static void defaultSite(Args _args) { InventTable inventTable = inventTable::find('D0001'); InventItemOrderSetupType setupType = InventItemOrderSetupType::Invent; InventDim inventDim; ; // Default Site inventDim.InventSiteId = inventTable.inventItemOrderSetupMap( setupType).inventSiteId(inventDim.InventSiteId, inventTable); // Default Location inventDim.InventLocationId = inventTable.inventItemOrderSetupMap(setupType, InventDim::findOrCreate(inventDim).InventDimId) .inventLocationId(inventDim.InventLocationId, inventTable, inventDim.InventSiteId); inventDim = InventDim::findOrCreate(inventDim); }
Keep Daxing!!
No comments:
Post a Comment