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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form InventOnhandItem InventDimId

(0) ShareShare
ReportReport
Posted on by 455

In my situation I need to display a field from InventItemLocation on the InventOnhandItem grid so I created a display method on InventSum datasource, the InventItemLocation find method requires itemId AND InventDimId as parameters. I see there are both ItemId and InventDimId in InventSum datasource but InventDimId always blank. I tried to pass inventDIm.InventDimId as someone suggested using joinChild() method but no luck it is always null or empty.

Any suggestions ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    306,446 Super User 2026 Season 1 on at

    Hi Samy,

    This form is build using some grouping of data. The InventDimId field is used here. If you have e.g. Site and warehouse enabled and you specified to see only on hand on Site level, the InventDimId is not used known as it is a summation of multiple records with different InventDimId's. So linking on the InventDimId of the InventSum datasource is not possible.

  • Samy123 Profile Picture
    455 on at

    I see.

    So there is no way I can display a custom field from InventItemLocation on this grid?

  • André Arnaud de Calavon Profile Picture
    306,446 Super User 2026 Season 1 on at

    To answer thay question, you need to provide some more information about the level of detail in the InventItemLocation table and which field you want to display. Maybe there is something to achieve when you can make some assumptions.

  • Samy123 Profile Picture
    455 on at

    Ok so here is the situation

    There is a requirement to display a custom field called deptLocation from InventItemLocation table on to the InventOnhandItem Grid. this custom field gives information about specific depts. against itemid, configid and warehouse. I am trying to display the value of this field on the grid using a display method. The InventItemLocation table find method require ItemId and InventDimId to get the correct record. in my display method on InventSum dataSource of the form I am trying to supply itemId and inventDimId from inventSum to the find method but it returns exception that method is called with illegal values because the inventDimId is always null. the line of code looks like this.

    InventItemLocation::Find(_inventSum.ItemId, _inventSum.InventDimId);

    as an alternate I tried following on someone's suggestion

    _InventDim = _inventSum.joinChild();

    InventItemLocation::Find(_inventSum.ItemId, _inventDim.InventDimId);

    But still get the same error and same situation.

    Hope that clarifies your question. Let me know if more information is needed.

  • Suggested answer
    Community Member Profile Picture
    on at

    Had this same issue a few weeks ago. What you need to do is make your field dependable on the visibility of the inventlocationId field. (it will only be visible and enabled if the inventory dimension is selected). Your field only makes sense if the inventlocationid is visible.

  • Samy123 Profile Picture
    455 on at

    the inventLocationId field is visible on the grid I have made it to stay visible on the Grid. But still no luck.

  • Suggested answer
    Community Member Profile Picture
    on at

    what I did was create the display method on inventdim table:

    display boolean X()

    {

       return WMSLocation::find(this.wMSLocationId, this.InventLocationId).someField;

    }

    then put this displaymethod on the form InventOnhandItemListPage.

    It worked fine.

  • Verified answer
    Samy123 Profile Picture
    455 on at

    thanks Boye for your reply but I need to return a record from InventItemLocation Table. for that I need InventDimId.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans