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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Total Amount field on Invoice entity not getting calculated accurately unless I open Invoice record

(0) ShareShare
ReportReport
Posted on by 45

Hi,

 

I am creating Invoice and Invoice Line Item entity records programmatically. Here, I am facing issue in calculation of OOB Total Amount field of Invoice entity i.e. somehow the Total Amount is not getting calculated properly on home grid and advance find of Invoice entity. But, when I open the respective Invoice record then Total Amount field is getting calculated correctly and then it gets displayed correctly on home grid and advance find as well.

 

I have checked by retrieving Invoice entity records as well in my script but the retrieved result is also not returning correct Total Amount.

 

Anyone have idea about this behaviour.

 

Thanks in advance!

 

Sachin

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi Sachin,

    Did you add the script on the Invoice form to calculate the Total Amount field, like Javascript?

    If so, then such a script will indeed only work when the form is loaded.

    You have to use a plug-in to achieve the calculation.

  • Sachin Ligam Profile Picture
    45 on at

    Hi Lu Hao,

    Thanks for your response.

    I am using OOB Total Amount field which is getting calculated OOB. I haven't added custom field and custom code.

    Thanks!

    Sachin

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi Sachin,

    You can try using an on-demand workflow to update invoices created programmatically, I think it will make the OOB Total Amount field recalculated.

    pastedimage1619591007956v1.png

    Use a field's existing value to update it, which means the data does not change, just trigger a save event.

    pastedimage1619591181542v2.png

    Then run this on-demand workflow for Invoices.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 98 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans