Hi everyone.
I'm trying to get ALL the Sites and/or Warehouses of a particular item by just showing them in the infolog. But I can't seem to understand where these info should come from. I'm new to AX. I learned that products can be found in EcoResProduct or InventTable. And Site/Warehouse in the InventDim/InventLocation. But I can't get how these two are related (even though I looked for each table's rerlations. I didn't find any, as far as I've tried to)
And I can't seem to find any reliable/exact help online. If you have insights on this, please tell me. Anything is appreciated. Thanks!
*This post is locked for comments
This is what I'm trying to look for! Thanks so much Rustem!
As you know, you can specify storage and tracking dimensions on item, but values of sites, warehouses and overs you can specify when you want to buy, sell, transfer (as example) items. When you create sales line you specify inventory dimension and system generate InventDimId value and record (if it's not exists) in inventDim table. Also when you specify sales qty system generates records in InventTrans table which has information about Item and InventDimId (reference to InventDim table). When you post invoice, or make reservation of Items system generate record in InventSum table which also has information about Item and InventDimId.
So, if you want to get information about Items and inventory dimensions, just select it from InventTrans or InventSum tables and join InventDim table.
static void Job177(Args _args) { InventTrans inventTrans; InventDim inventDim; Counter i; while select inventTrans group by ItemId, InventDimId join inventDim group by InventSiteId, InventLocationId where inventDim.inventDimId == inventTrans.inventDimId { i++; info(strFmt("%1 - %2 - %3", inventTrans.ItemId, inventDim.InventSiteId, inventDim.InventLocationId)); if (i == 10) break; } }
static void Job178(Args _args) { InventTrans inventSum; InventDim inventDim; Counter i; while select inventSum group by ItemId, InventDimId join inventDim group by InventSiteId, InventLocationId where inventDim.inventDimId == inventSum.inventDimId { i++; info(strFmt("%1 - %2 - %3", inventSum.ItemId, inventDim.InventSiteId, inventDim.InventLocationId)); if (i == 10) break; } }
I just want to show the site/Warehouses an Item has.
Per se, I have an Item A0001 and it has two sites, 1 and 11. In site 1 it has 12 warehouses, and in site 11, it has 3 warehouses.
I just want to infolog these details to show the Sites/Warehouses it has. (not concerning the on hand availability or anything, just the site id and location id)
:) :)
Take a look at this link to understanding of inventory dimensions:
http://basicax.blogspot.com/2013/03/ax2012-understanding-inventdimid.html
There is no direct connection. Item can be on-hand in the warehouse or may not be, because it has been just created and has never been produced, sold or purchased. So what are you actually doing ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,316 Most Valuable Professional
nmaenpaa 101,156