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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Implement Total functionality for Form

(0) ShareShare
ReportReport
Posted on by 4,624

Hi,

 I have form with header and line (just like salesTable or PurchTable). I have to add a total functionality for this form same like on saleTable form or PurchTable form i.e to display total qty, total Value etc..

  So my question is can I achieve it through view (and attach it to view) or do I need to implement same functionality like salesTotal or PurchTotal (create class for totaling and all)?

 pleas suggest simple & best approach

*This post is locked for comments

I have the same question (0)
  • Rohin Profile Picture
    4,624 on at

    I would like to have suggestions on this please.

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Are you trying to display data from SalesTable or PurchTable or want to simply mimic the design. If you want to source data from these tables(or relevant child tables) I would suggest to go with the view approach as it provides simple view to the user. If you check SalesTotals/PurchTotals lot of business logic is involved, so I feel form design with too many display methods will cause performance hit and so design with computation in a class might be chosen(and values are displayed on form). Could you provide some more details about what you want to display on the form.

  • Rohin Profile Picture
    4,624 on at

    Thanks Chaitanya.

     NO, I don't want the data from SalesTable or PurchTable. I have simple customized form with Header and Lines there. I want to add the total functionality to this form. Means there should be one Total button which open one form and display the some fields there which would show sum of lines fields there etc..

    please suggest  

  • Rohin Profile Picture
    4,624 on at

    Thanks Sukrut, What I did created a Class and create a method with returnType container that run on server.

    I did all calculations here by joining tables and all. Then on form  get the formControl value from the container from class.

     But I would like to know other better way in terms of performance like create a AOT query and the get the values from query on form during runtime or View etc..

    please suggest

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    I feel the way you implemented looks fine and if you want to implement the same using view as data source, then you should write/develop different view methods(for different fields) which may not yield better performance than the first approach.  

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans