Skip to main content

Notifications

Announcements

No record found.

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,085

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

  • omesh Profile Picture
    omesh 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

  • Suggested answer
    Brandon Wiese Profile Picture
    Brandon Wiese 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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans