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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

subtotal in purchtablelistpage form

(1) ShareShare
ReportReport
Posted on by 123
hello everyone,
 
I am trying to add subtotal column in the purchtablelistpage form, 
i have added the code like this, but it was showing the subtotal only for existing purchase order, 
 
[ExtensionOf(tableStr(PurchTable))]
public final class ABCPurchTable_Extension
{
    Display PurchLineAmount SubTotal()
    {
        PurchTotalsSummary   pts;
        ;
        select pts where pts.PurchId == this.PurchId;
        return pts.NetLines;
    }
}
 
what changes should be done if we want subtotal for newly created purchase order for all order status
  • Suggested answer
    Layan Jwei Profile Picture
    8,421 Super User 2026 Season 2 on at
    Hi M_R,
     
    So you want the total for all purchOrders and not just the current purchase order?
    If that's the case, your code won't work because in the where condition you are saying where pts.PurchId = this.PurchId -- which means it will give the total for only this PurchId
     
    If you need the total for all PurchIds then you need to use the keyword "count"
     
    Select count(FieldYouWantToCount) from Table1
     
    Thanks,
    Layan Jweihan

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 510 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 302 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans