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

Calculate Roll-up fields synchronously

(0) ShareShare
ReportReport
Posted on by 1,616

Hi Experts,

I have a currency roll-up field on opportunity form. It calculates the sum of currency values from related entity records. It is working fine for every one hour.

But, i want that value to be calculated when form get loaded.

Is it possible to do it on client side without clicking refresh icon on roll-up field?

Thanks in Advance.

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at
    RE: Calculate Roll-up fields synchronously

    Rollup fields can be calculated synchronously via a CalculateRollupFieldRequest, but this message does not have a corresponding action for use with the new Web API on the client side. You might be able to call this from the client side via SOAP, but I think you would still have an issue that this would recalculate the data on the server, but not refresh the field on the form.

    An alternate approach would be to call CalculateRollupFieldRequest from a plugin on the pre-stage of the Retrieve message. However, you will need to check is this adds excessive performance overhead

  • Suggested answer
    ScottDurow Profile Picture
    21 on at
    RE: Calculate Roll-up fields synchronously

    You can only do this on the server using  the CalculateRollupFieldRequest - see msdn.microsoft.com/.../microsoft.crm.sdk.messages.calculaterollupfieldrequest.aspx

    You could create a custom action that is called from Javascript that calls this request - www.magnetismsolutions.com/.../Call-Action-in-CRM-2015-Easily-from-JavaScript-Library

    Hope this helps?

  • ScottDurow Profile Picture
    21 on at
    RE: Calculate Roll-up fields synchronously

    It's also worth noting that there is a maximum number of records that can be rolled up (10,000) when calling the recalculate using CalculateRollupFieldRequest.

  • ScottDurow Profile Picture
    21 on at
    RE: Calculate Roll-up fields synchronously

    How did you get on - do you need any more help?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans