Tip #835: “Owner equals current user” in Microsoft Flow

On the most recent episode of CRM Audio we discuss using Microsoft Flow to create a task in Wunderlist when a task is assigned to me in Dynamics 365. On the surface, this looks like an easy process. Have a flow triggered when a task is created in Dynamics, have a condition that ownerid=me, and then create the task.

After trying this and failing miserably, I knew something was missing. I tried “ownerid = Joel Lindstrom” and “ownerid = [my user id GUID in CRM]”, and neither would work.

Thanks to a helpful example from David Yack, I learned the error of my ways.

Instead of specifying the ID of the user, the follow approach will actually work.

  • When a task is created.
  • Add a step to get current user’s O365 profile.
  • Add a step to get the CRM user record of the task owner in Dynamics
  • Add a condition to compare an attribute of the user record with the same field on the O365 user profile. In this example I used primary email address.
  • If they match, create your task.

flow

Though this is a few more steps than my original failed attempt, it is actually better, as it doesn’t hard code the user name or ID.

Tweet about this on TwitterShare on Facebook8Share on Google+1

Leave a Reply

Your email address will not be published. Required fields are marked *