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...
Suggested Answer

Issue with Modern Flow order of execution

(0) ShareShare
ReportReport
Posted on by 129

Hi All,

We have 2 Flows that are fired when a Case is accepted.

The 1st Flow creates the team memberships when the Case is accepted.

The 2nd Flow sends email notifications when a Case is accepted.

The 2nd Flow relies on the 1st Flow because that Flow generates the team memberships so it knows who to send the email to.

The problem is that they both triggered when a Case is accepted (Case status is changed to Accepted).

So you can see the potential problem?


- The 2nd Flow could be half way from completion while the 1st Flow is still in progress OR

- The 2nd Flow completes before the 1st Flow so not all emails are sent OR

- The 1st Flow completes before the 2nd Flow is executed (the ideal scenario).

But it is not a perfect world so we end up with erratic results like no emails are sent or some emails or all emails.


So how do we fix it?

1. Make them a single Flow OR

2. Generate the team memberships before the Case is accepted

3. Delay the run of the 2nd Flow by a few milliseconds or seconds

3. Perhaps use plugins instead.


But we are stuck with Modern Flows.

Can anyone think of another way so that the 1st Flow completes first before the 2nd Flow?

Thanks

a2z

I have the same question (0)
  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi a2z,

    In this case we have multiple ways.

    1. Add the 2nd flow steps to the end of the 1st flow, and turn off the 2nd flow.

    2. Create a child flow that is the same as the 2nd flow.

    How to create child flows: https://docs.microsoft.com/en-us/power-automate/create-child-flows

    3. For Case entity, create a two option set field that default value is No .

    Add an "Update a record" step at the end of 1st Flow, and update the two option set field to Yes.

    Change the trigger of 2nd Flow to update the two option set field to Yes, add an "Update a record" step at the end, and update the two option set field of Case to No.

  • Suggested answer
    a2z Profile Picture
    129 on at

    Yep, forgot about that field trigger that can be used and yes, I have implemented using a new field trigger to order the execution of the modern flows. Not sure about invoking a child modern flow as it seems to rely on manual invocation. Thanks.

    a2z

  • LuHao Profile Picture
    40,892 on at

    Hi a2z,

    The trigger for the child flow is "Manually trigger a flow", which is by design. This is not done manually by the user, but by the parent flow calling the child flow to run it.

    Also, if my answer helped you, please click Yes under "Did this answer your question?". Thanks.

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
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 42

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans