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

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

OnDelete Rollup field autoCalculation request

(0) ShareShare
ReportReport
Posted on by 37
     else if (context.MessageName.Equals(/Delete/))
     {
         if (context.InputParameters.Contains(/Target/) && context.InputParameters[/Target/] is EntityReference)
         {
             Entity entity = (Entity)context.PreEntityImages[/Image/];
             EntityReference department = null;
             if (entity.Attributes.Contains(/mr_miss/))
             {
                 department = entity.GetAttributeValue<EntityReference>(/mr_miss/);
             }
                                                            
             CalculateRollupFieldRequest updateRequest = new CalculateRollupFieldRequest
             {
                 Target = department,
                 FieldName = /budgeta/
             };
             CalculateRollupFieldResponse updateResponse = (CalculateRollupFieldResponse)service.Execute(updateRequest);
         }
     }
 }
i wrote this plugin but the request is not working well unless i press on /Recalculate/ button , can someone help me with this?

 
I have the same question (0)
  • RudyZhang Profile Picture
    Microsoft Employee on at
    Hi,
     
    We have analyzed your requirements and based on the information you have provided, we are unable to determine if there is an error in your plugin code.
     
    We found a post in the Power Platform forums with a similar issue to yours, which provides a solution to force the Roll Up field to be calculated using /CDS Workflow + Plugin/.
     
    Please refer to the post in the link below
    https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Force-rollup-fields-calculation/td-p/437860
     
     
     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Rudy Zhang

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 69 Super User 2026 Season 1

#2
BillurSamdancioglu Profile Picture

BillurSamdancioglu 55 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans