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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form InventOnhandItem adding new fields which exist in InventSum table - don't retrieve the data

(0) ShareShare
ReportReport
Posted on by 2,699

Hi,

I've written some code to populate a new qty field in InventSum to determine the remaining physical qty on sales order line of a particular type.  This is not a display method but an actual data field in the table InventSum.  I have also included the ItemGroupId in this table - again not display method but actual data field which is included during the insert of a record to inventSum.

I have added these to the InventOnHandItem form so that they will display but it must be controlled by some form of advanced query which defines the retrieval of certain fields.

The fields I have added are returned as unretrieved.  Can someone please advise me on how to alter this - again these need to be filterable for users so they cannot be display methods.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Fx Profile Picture
    425 on at

    Hi,

    Your field are probably not in the Query statement.

    The InventSum query in not like a "Select * from" but each field are clearly named in the statement like  "Select field1, field2, field3, ... from " so if you add custom fields in the table you have to add them in the statement too.

    Take a look here: Data Dictionnary\Tables\InventSum\queryAddSumFIelds() and add a line like addField(fieldNum(InventSum,MyField));

    Regards

    FX

  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi,

    I do agree with Fx. As the table InventSum is not directly used, but a grouping based on selected inventory dimensions you indeed have to include these fields in the method provided by Fx.

  • Verified answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at

    Fx described how you'd add the quantity field there, but you also need to think about how you would add the string ItemGroupId. Because it will either need to be grouped by or aggregated on. I assume you'd want to group by it

    You should look at the Classes\InventDimCtrl_Frm_OnHand\modifyQuery() method for this. This is called when you open the On Hand form, where Item number is shown.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans