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 :
Microsoft Dynamics CRM (Archived)

Total Field is not calculated for imported invoice until I open the record

(0) ShareShare
ReportReport
Posted on by

Hi

I have lots of invoices which are imported to Dynamics CRM. But the total field is not calculated until I ope each record and save it. Is there any way to make it calculated automatically ?

Regards.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Write a custom plug-in to calculate invoice Total Amount. Register on create message of Invoice, but do this during off-hours if you have a lot of records.

    do you link the imported records back to the sales process (opportunity->quote->order) or are they orphaned?

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    This is because the price calculations only happen when you add items via the UI or whenever you open the record. You will need to import the total values when you import the records - alternatively you could export to Excel and mark for reimport before updating the total field in excel and then reimporting.

    Hope this helps

  • Community Member Profile Picture
    on at

    Thanks for your reply. I have to register on pre or post state of create message ?

    The invoice is not linked to anything and it is orphaned.

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    I wouldn't recommend creating a plugin for this since it can create inconsistencies in the out of the box calculations - it would be better to import to total along with the other values.

  • Community Member Profile Picture
    on at

    Upvote Scott Durow's answer about importing. The downside of importing is that you have to work a little harder to create the formulas to account for discounts, taxes, etc. With a plug-in you still have to do this but it's a little easier to extract the calculations from the data model by code than from the UI.

  • Community Member Profile Picture
    on at

    You mean I put all fields in my file (which is to be imported) ?

    Would you recommend a server that peridcally do that instead of a plugin ?

  • Community Member Profile Picture
    on at

    You mean I put all fields in my file (which is to be imported) ?

    Would you recommend a server that periodically do that instead of a plugin ?

  • ScottDurow Profile Picture
    21 on at

    If you are importing invoices - I would recommend that you import the totals fields as well.

  • ScottDurow Profile Picture
    21 on at

    How did you get on Babak? Do you need any more help with this?

  • Coty Profile Picture
    89 on at

    Ugh, I have the same issue.  Note that this wasn't an issue in version 8, it was introduced in version 9.  My case may be slightly different in that I am already using a plugin to convert an existing order into an invoice and the totals are not calculated.  I am using the method "ConvertSalesOrderToInvoiceRequest"

    You would think that the totalamount field would be included in the convert but I guess it's not?   I read in another post you can do a retrieve to force CRM to do the calculation but this will slow down an already slower process.

    Any other way?

    EDIT:  I went into the relationship between the Order and Invoice and went into the Mappings section.   SalesOrder.totalamount is already mapped to Invoice.totalamount so it should get copied over during convert.  Bug?

    Thanks,

    Coty

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans