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)

Total Sales Invoiced Amount on SalesTableListPage Form

(0) ShareShare
ReportReport
Posted on by 1,909

Dear all,

I have an issue with following method is not displaying invoiced amount. Before invoicing the method is calculating invoicing amount but once after its invoiced the amount becomes zero in main SalesTableListPage Form. Could you please help me with any other methods that calculate Sales order invoice amount even after its invoiced.

 display AmountCur totalSalesAmount()
 {

      SalesTotals salesTotal;
         ;

       salesTotal = SalesTotals::construct(this, SalesUpdate::All);
       salesTotal.calc();

      return  salesTotal.totalAmount();

}


Regards,

Faqru

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    That’s a standard behaviour of AX. After you invoice an order, go on Total's button from UI and you would wonder that everything is zero. Once order is invoiced you cannot see amounts in total. An alternative to that should be something as under:

    If(Order Not Invoiced)

    {

    Calculate from SalesTotal Classes

    }

    Else

    {

    Get amount from invoiced journals, of that order.

    }

  • Faqruddin Profile Picture
    1,909 on at

    Thanks Shoaib. I really wondered with AX UI button after its invoiced. However could you please help me with invoiced journal tables.

  • Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    what kind of help you would like to have?

    have you had a look at any of following..?

    CustInvoiceJour[Table].InvoiceAmount[Field]

    CustInvoiceJour[Table].InvoiceAmountMST[Field]

    Should not be difficult to get sum of all posted invoice journal by using Select Sum(FieldName)

  • Verified answer
    Faqruddin Profile Picture
    1,909 on at

    Thanks shoaib. There is already standard method amountInvoiced on SalesTable. Below code is working for me.

     display AmountCur totalSalesAmount()
     {
        SalesTotals salesTotal;
           ;
    
    
         if(this.SalesStatus == SalesStatus::Invoiced)
         {
    
          return this.amountInvoiced();
    
         }
    
         else 
         {
    
          salesTotal = SalesTotals::construct(this, SalesUpdate::All);
          salesTotal.calc();
          return  salesTotal.totalAmount();    
    
      }
    
     }

    Regards,

    Faqru

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight 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