Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Trigger workflow on previous child account when parent Account is changed

(0) ShareShare
ReportReport
Posted on by 142

Hi,

I have a scenario with Parent and child Accounts. Had to do multiple Roll up calculation on the Parent Account based on the fields in Child Accounts. Wrote a custom workflow to do all the calculations which works fine. But have a scenario below which fails.

Parent Account A has a Child Account C . Now On Child C I wanted to change the Parent Account From A to B.In this case the rollup calculations has to happen on the Parent Account B which works fine. I want to do the Calculations even on parent Account A also as the child C is no longer with parent A. 

I tried calling 2 workflows on this. 1 is a asynchronous workflow which triggers after the parent account is changed and another workflow which is a real time workflow which triggers before the parent account is changed. But this is working when i tested with 1 field but when tried for multiple fields it is not working. Not sure before the real time workflow executes the asynchronous workflow starts executing and so the calculations are not happening correctly. My custom workflow only runs on child accounts. Can anyone help me with the ways that I can trigger the workflow on previous parent child account. 

*This post is locked for comments

  • GPrasanna Profile Picture
    142 on at
    RE: Trigger workflow on previous child account when parent Account is changed

    Thanks for the response David , I cannot use Rollup fields as we have more than 15 fields to calculate on an entity and we have limitation to not add more than 10 per entity. So had a custom workflow to do . Wrote 2 workflows to calculate all fields for Before and after changes. Was getting wrong results. However, we have modified the custom workflow to calculate the previous and current calculations. It works now after code change.

  • David Jennaway Profile Picture
    14,065 on at
    RE: Trigger workflow on previous child account when parent Account is changed

    This should work in theory, and the synchronous before workflows should always run before the asynchronous ones.

    Are you using one workflow to update multiple fields in each case, or one workflow per field ?

    In what way is it not working ? Is the calculation not happening, or giving the wrong result ? If you enable auditing you can tell if the calculation is happening based on whether the field is updating

    Alternatively, could you use rollup fields instead ?

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 the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans