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)

Add a display field to a form. Sum of all amounts of filtered records.

(0) ShareShare
ReportReport
Posted on by 1,087

Hi,

i have a form in ax 2012.

I want to add a display field outside the grid with the sum of the amounts of the records i get with my filters.

I dont know where to put the code for this. I can do it for marked records, but not for all the record i see in the grid. Any help?

thank you in advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at
    RE: Add a display field to a form. Sum of all amounts of filtered records.

    I think you would want to hook into the executeQuery() method of your grid's datasource, after the super() method.  From there, copy the datasource's query into a new Query object, change the mode to Group, add the selection fields you want to display, and then run that query with a QueryRun object, after which you can retrieve the answer from those fields.

  • omesh Profile Picture
    141 on at
    RE: Add a display field to a form. Sum of all amounts of filtered records.

    Hi,

    You can refer below link for the reference

    http://dev.goshoom.net/en/2015/11/summarized-values-in-ax-form/

    Thanks

    Umesh

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
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans