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 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

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 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 38 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans