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)

find on Hand items Location (WMSLocationID)

(0) ShareShare
ReportReport
Posted on by 790

Hi,

I am able to find the on hand inventory using below code:


inventDIm.InventLocationId = 'Location';
invDImParm.initFromInventDim(inventDIm);
onHand= InventOnhand::newParameters('Item_ID',inventDIm,invDImParm);
quantity = onHand.availPhysical();

But I would like to know where that item is ?

Basically say I am finding finding teh onHand available physical of an item then I want to get its dimensions.

In my case I am specifically finding in a site and under a particular warehouse what is the total quantity available and what is the location of it ?

Thanks in advance,

Anoop

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sagar Suman Profile Picture
    6,542 Super User 2025 Season 2 on at
    RE: find on Hand items Location (WMSLocationID)

    Hi Anoop Tripathi,

    In case you want to know the location of the item by code I will not be able to help but in case you want to navigate in AX and find the same you can do by going to on hand inventory report and by filtering your item with all its dimensions and you will be able to determine on which locations  items is physically lying in a particular warehouse.

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: find on Hand items Location (WMSLocationID)

    Hi,

    You can use the following job to get available physical quantity, location, and warehouse for a
    given item and siteId.

    static void InventOnHand(Args _args)
    {
    InventTable inventTable;
    InventSum inventSum;
    InventDim inventDim;

    while select * from inventTable
    where inventTable.ItemId == "XYZ"
    join inventSum
    where inventSum.ItemId == inventTable.ItemId
    join inventDim
    where inventDim.inventDimId == inventSum.InventDimId
    && inventDim.InventSiteId == "Site1"
    //&& inventDim.InventLocationId == "loc" // Specify Warehouse here
    {
    info(strFmt("Location: %1, WH: %2, Avail physical: %3", inventDim.wMSLocationId, inventDim.InventLocationId, inventSum.AvailPhysical));
    }
    }

    Same thing is achievable using query InventOnHand.

    Thanks,
    Chaitanya Golla

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: find on Hand items Location (WMSLocationID)

    I will give you the ultimate solution on how to find out such details for majority of the cases, where the fields are bound controls.

    Navigate to the On-hand inventory form within AX, set up the Inventory Dimensions as per the detail level you require (Site, Warehouse, Location I assume). Right click on a relevant bound field > Personalization > Query tab.

    Now you have all the tables, their relations and their query ranges to be applied to get the information you see on the screen.

    Next step is replicating the same within a Query, a View (if the previous two do not already exist in Standard AX, which in this case they do), or a simple select statement with the appropriate joins.

    You would be surprised that it is almost a match for what Chaitanya has coded for you.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
AlissonGodoy Profile Picture

AlissonGodoy 2

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans