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)

Word Template Sums & Calculations

(0) ShareShare
ReportReport
Posted on by 190

Hi

I have started using Word templates to create Invoices from CRM and want to know if it is possible to have a field that sums the line items together but cant figure out the way to do it. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tomas Prokop Profile Picture
    590 on at

    Hi Shane,

    I had to solve this by calculated fields and rollup fields (for line items).

    Rollup fields are not calculated immediately so we have hooked a workflow on Invoice Product which forces the recalculation whenever you add or change something.

    You can use github.com/.../Force%20Calculate%20Rollup%20Field.md

    or

    github.com/.../Rollup%20Functions.md


    Rollup function sample:

    chrome_5F00_2018_2D00_03_2D00_20_5F00_22_2D00_45_2D00_18.png

    <?xml version="1.0" encoding="UTF-8"?>
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
       <entity name="invoicedetail">
          <attribute name="extendedamount" />
          <filter type="and">
             <filter type="and">
                <filter type="or">
                   <condition attribute="tntg_vatrate" operator="eq" value="0" />
                   <condition attribute="tntg_vatrate" operator="null" />
                </filter>
                <condition attribute="invoiceid" operator="eq" value="{PARENT_GUID}" />
             </filter>
          </filter>
       </entity>
    </fetch>


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