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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Calculate a roll-up field after delete event

(0) ShareShare
ReportReport
Posted on by 295

Hi

I am using an installed plugin to force calculation of a roll up field on the parent entity as described here

https://github.com/demianrasko/Dynamics-365-Workflow-Tools/blob/master/docs/Force%20Calculate%20Rollup%20Field.md

The problem I have is that when a child record is deleted the roll up field is not re-calculated. Or it may be re-calculated but gives the wrong value.  I have selected the option to trigger the workflow when a record is deleted, but it is only the only one available is before so I am assuming this is the problem? We are using Dynamis 365 On-premises. 

workflow-options.png

Thanks

Teresa

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Teresa,

    Your assumption makes sense. The workflow on delete even triggers before the actual delete happens so it is possible that the calculation is correct but it is not calculating after the delete. I think for delete, you will have to write some custom plugin as workflow can't be triggered after delete.

    I haven't tried this but in the below thread it is mentioned that executing the workflow in the background can help in this case. You can try this. I would suggest you to write a different workflow instead of changing this workflow to background.

    community.dynamics.com/.../157499

    Hope this helps.

  • Priyesh Profile Picture
    7,396 User Group Leader on at

    It doesn't look like the one Teresa got from Git would help. Will need to ask the author if post Delete is supported or not. Else, you'll have to write your own plugin to do so.

  • Tessacq Profile Picture
    295 on at

    Thanks Ravi, as a work around for the moment I have stop users from deleting records, they can inactivate them.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Great. Please mark the suggestion as helpful if it helped you :)

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

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans