cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mholderlfimgc
Level: Power Up

flow loops in dynamics 365 update

So, I spent like 30 minutes writing up this post only for Microsoft to throw an error and now I have to type it out again. Instead of doing that, I am going to keep it simple this time and just answer whatever questions you have.

 

I have a flow that when an Account entity record is updated in Dynamics 365 it does one of two things - it either assigns the record to the team of the user who modified it, or directly to the user who modified it. I have a condition in place that if the Relationship Type is set to "Claimed" it will assign it to the user. If it is set to "Unclaimed" it will assign it to the Team of that user.

 

The problem is, when it updates the record Flow picks it back up again because it sees it having been updated. What do I do?

1 ACCEPTED SOLUTION

Accepted Solutions
mholderlfimgc
Level: Power Up

Re: flow loops in dynamics 365 update

What I ended up doing is creating a text field in Dynamics 365 called FlowRan. I also created a workflow in Dynamics 365 that when the relationship type changes on an account record it sets the FlowRan field to "False". I then created a scheduled flow that filters for accounts modified within the last 15 minutes who also have the FlowRan field marked "False". It will only process those records. Upon successful completion it will mark the FlowRan field as "True" so that it does not re-run those records.

 

This ultimately became the solution.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: flow loops in dynamics 365 update

Hi @mholderlfimgc ,

 

The solution is add an IF condition before your update.

 

You could check if assign/owner of the record is modifed by then do not update again. Same for the team as well. This way second time when flow triggers it won't update again.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



mholderlfimgc
Level: Power Up

Re: flow loops in dynamics 365 update

Yes, but with how Flow counts each successful run as a 'run' so it goes against your run limit.. I was hoping to prevent it from running altogether. We have hundreds of transactions a day. You can see how this might an issue.

Super User
Super User

Re: flow loops in dynamics 365 update

Hi @mholderlfimgc ,

 

Thanks for your quick reply.

 

There is no other workaround unless if you run on a schedule basis. Add a new optionset. Values are default null, Waiting to update and  Updated. When realtionship type is set then update the optionset to 'Waiting to update'. You could update this via CRM workflow.

 

In your flow use the list records flows action filtered by 'waiting to update' condition to retrieve the records. Update the records and set the optionset to updated.

 

If you would like the particular field trigger feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Super User
Super User

Re: flow loops in dynamics 365 update

Hi @mholderlfimgc 

 

Do you need further help?

 

If the below posts helps, then please consider Accept it as the solution to help the other members.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



mholderlfimgc
Level: Power Up

Re: flow loops in dynamics 365 update

What I ended up doing is creating a text field in Dynamics 365 called FlowRan. I also created a workflow in Dynamics 365 that when the relationship type changes on an account record it sets the FlowRan field to "False". I then created a scheduled flow that filters for accounts modified within the last 15 minutes who also have the FlowRan field marked "False". It will only process those records. Upon successful completion it will mark the FlowRan field as "True" so that it does not re-run those records.

 

This ultimately became the solution.

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,332)