Refresh rollup field using power automate

In today's rapidly evolving business landscape, data is not just a commodity; it's a strategic asset that drives informed decision-making and enhances organizational efficiency. One of the cornerstones of efficient data management within the Microsoft Power Platform is the concept of rollup fields. These fields provide a powerful way to summarize and aggregate data from related records, enabling users to gain valuable insights at a glance. However, in dynamic business environments, ensuring that these rollup fields reflect the most up-to-date information is crucial.

This is where the capability of Microsoft Power Automate comes into play. Among its many capabilities, Power Automate can be harnessed to refresh rollup fields automatically, ensuring that the data is always current and accurate. In this blog, we will dive into the intricacies of refreshing rollup fields using Power Automate, exploring the step-by-step process and unveiling the benefits of this dynamic synergy.

For the purpose of demo, I am making use of two entities namely Teams and Score which are related. There is a one-to-many relation between Teams and Score. There is a field in the Teams entity which is of type rollup which holds the sum of scores of related records.


I have created a canvas app to add the scores to the Scores table and there is a gallery to show the teams data. 


Now we will see how we can update rollup field using power automate.

Step 1: Create the trigger for the flow.
Our flow should trigger whenever a new record is added in the score entity.




Step 2: Invoke an HTTP request
Next step is to generate an HTTP request to refresh the rollup field.


Syntax for the GET method:

https://<Org URL>/api/data/v9.2/CalculateRollupField(Target=@Target,FieldName=@FieldName)?@Target={'@odata.id':'<Table Name>(Record ID)'}&@FieldName='<Field Name>'

The rollup field would be updated following the completion of the 'Invoke an HTTP request' step.




 

Comments

Popular posts from this blog

Create HTML table by combining columns from multiple entities

Dynamics 365 CRM Form Switching: A Deep Dive into formSelector and navigate()

Create and Send Emails with Attachments in D365/Dataverse with Power Automate