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

Notifications

Announcements

No record found.

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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans