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)

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

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    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 ?

  • GPrasanna Profile Picture
    142 on at

    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.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans