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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Quote Product Quantity

(0) ShareShare
ReportReport
Posted on by

How to add the total quantity of products in word template, please see the below word template which is taken for printing purpose

pastedimage1571763432570v1.png

Kindly help.

  • Verified answer
    LuHao Profile Picture
    on at
    RE: Quote Product Quantity

    Hi Ashik,

    You need to create a field for the Quote entity to summarize the quality of the quote products, so it should be the rollup field.

    The rollup field won't be calculated in time, so we'll use the workflow to make it recalculate each time quote is updated. (This workflow is a custom workflow and you must not write code.)

    Alternatively, we can set the refresh time of the rollup field, which can be as short as 1 hour.

    1. Create a rollup field.

    Create a new field for the Quote entity, Date Type is Decimal Number, and Field Type is Rollup.

    pastedimage1571811743287v1.png

    Edit its rollup logic. Related: Quote Lines(Quote).SUM of Quantity.

    pastedimage1571811884544v2.png

    Place this field on the quote form and test it. You need to click on the calculator icon and click Recalculate to make it effective.

    pastedimage1571812101394v3.png

    2. Create a custom workflow.

    The SDK contains the class “CalculateRollupFieldRequest” that can force the calculation to occur on a specific record without having to wait until the scheduled recalculation job runs. Using this class is as simple as passing in a target EntityReference and the rollup field on the Entity.

    Please refer to the following two blogs with sample code.

    https://www.plusconsulting.com/forced-calculation-of-a-rollup-field-using-custom-workflow-activities-in-microsoft-dynamics-365/

    https://technologyblog.rsmus.com/microsoft-dynamics/dynamics-365-customer-engagement/changing-rollup-calculation-frequency-microsoft-dynamics-crm-2015/

    Or you can download the workflow tool to use directly.

    Please refer to this post: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/273683/word-template-sums-calculations

    3. Set the refresh time of the rollup field.

    This is a codeless way to have the rollup field refresh every hour.

    Please refer to this blog: https://community.dynamics.com/365/b/sachinbansalmicrosoft/posts/dynamics-365-rollup-fields-important-points

  • LuHao Profile Picture
    on at
    RE: Quote Product Quantity

    Hi partner,

    Don't forget to mark the verified answer by clicking Yes.

    pastedimage1572571687250v1.png

    This will help other users quickly navigate to this post.

    Thanks.  :)

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans