Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Add display method to InventOnHandItemListPage form

(0) ShareShare
ReportReport
Posted on by 114
Hello everyone. I want to add a display method to the InventOnHandItemListPage form. I write the method in the extension class I created for the inventSum table. I also need InventDimId information for the related method. However, I cannot access the relevant data in any way. I can only access the itemID field in the InventSum table from the code. this.InventDim() method does not return any data. I didn't understand exactly where I'm making a mistake. All I want to do is to access the inventDim data of the relevant row. Can anyone help with the subject?
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Add display method to InventOnHandItemListPage form
    I won't give you an example "how to read InventDimId from extension of InventSum table", because it's a completely wrong thing to do in your case. First of all, please read the explanation in my first reply. Then use the debugger to see that it's indeed the case. There is on InventDimId available in the form, therefore trying to find InventDim record for it (e.g. by inventDim() method) can't ever work.
     
    Also, trying to write your code in a InventSum extension is wrong, because it can't tell you which dimensions are aggregated by in the form.
     
    Instead, use the InventDim data source of the form (InventOnHandItemListPage). For example, to get the site, use inventDim.InventSiteId.
     
     
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,391 Super User 2024 Season 2 on at
    Add display method to InventOnHandItemListPage form
    HI Emre,

    Have you considered using Location as inventory dimension for the shelf? In that case, you can use standard functionality. You can then display the on-hand on the location level, next to site and warehouse.
  • Emre Karakus Profile Picture
    Emre Karakus 114 on at
    Add display method to InventOnHandItemListPage form
    "You should use those two inventory dimensions (site and warehouse)" 
    That's is the my problem. i can't access to any information except itemID from inventSum table. I am trying to reach that information like "this.InventDim().InventSiteId" but that method doesn't return any data.  I need to InventDim informations because i need to select data from my table according to site and locaiton informations.  If you give me an example for how to read InventDimId from extension of InventSum table i can handle the remaings.
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Add display method to InventOnHandItemListPage form
    Then the problem doesn't exist, because you don't need InventDimId for anything. You should use those two inventory dimensions (site and warehouse). Of course, all lines with the same site and warehouse will show the same shelf and the form may display data across sites and warehouses.
     
    I can't say whether your table meets business requirements, because I still know nothing about it. Normally I would say a shelf is an inventory dimension, but you probably mean something else...
  • Emre Karakus Profile Picture
    Emre Karakus 114 on at
    Add display method to InventOnHandItemListPage form
    I created a table to keep the shelf information of the products. in the table; item code, facility, warehouse and shelf information. For example; 
    Item Code InventSideId InventLocationId Shelf
    000001 001 001Main A01
    I want to get the shelf information from the table I created according to the inventory dimensions and show it in the InventOnHandItemListPage form.
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Add display method to InventOnHandItemListPage form
    You'll need think it through again, because your design won't work. The form doesn't show data for each individual combination of dimensions (InventDimId). It summarizes the records, e.g. it'll tell you that you have ten items in warehouse A, although each of those ten items has a different serial number and therefore a different InventDimId.
     
    If you describe the business requirement to us (not just your technical design), we might be able to help you design a feasible solution.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans