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 :
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
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,097 Super User 2025 Season 2 on at
    subtotal in purchtablelistpage form
    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans