Skip to main content

Notifications

Announcements

No record found.

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 293

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

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Calculate a roll-up field after delete event

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

  • Tessacq Profile Picture
    Tessacq 293 on at
    RE: Calculate a roll-up field after delete event

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

  • Priyesh Profile Picture
    Priyesh 7,396 User Group Leader on at
    RE: Calculate a roll-up field after delete event

    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.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Calculate a roll-up field after delete event

    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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans