web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Sites and Warehouses

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Sites and Warehouses

    This is what I'm trying to look for! Thanks so much Rustem!

  • Verified answer
    Rustem Galiamov Profile Picture
    8,072 on at
    RE: Sites and Warehouses

    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;
        }
    }


  • Community Member Profile Picture
    on at
    RE: Sites and Warehouses

    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)

    :) :)

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at
    RE: Sites and Warehouses

    Take a look at this link to understanding of inventory dimensions:

    http://basicax.blogspot.com/2013/03/ax2012-understanding-inventdimid.html

  • Mea_ Profile Picture
    60,284 on at
    RE: Sites and Warehouses

    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 ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans