Real-world business problems can be solved quickly and easily with Microsoft Flow- now known as Power Automate. In this video, Venkat demonstrates how to use Flow to address two scenarios: 1) when a record is created in Dynamics 365, another record is auto-created in Microsoft Planner and assigned to a certain user; 2) when the phone number of an account in D365 is changed, the phone numbers of all related contacts are also updated. All of this is achieved using Microsoft Flow and requires no custom coding.
Never Miss a Video, Subscribe Now!
Venkat: Hi, I’m Venkat, and today we talk about Microsoft Flow. What exactly is Microsoft Flow? Microsoft Flow is a platform that lets you integrate lots and lots of your solutions within your business. With Microsoft Flow we can set up some easy rules where based on a certain trigger, various actions happen in one or more solutions. In this video we look at two scenarios. In the first scenario, we’ll see how when a record is created in Dynamics 365 another record is created in Microsoft Planner as well and assigned to a certain user. In the second scenario, we’ll see how when the phone number of an account in Dynamics 365 is changed, the phone number of all the related contacts also change using Microsoft Flow and not any sort of custom coding. Let’s dive right in.
So, to open Flow I can either go to the Office 365 portal and look for Flow from this list, or I can just go to Flow.microsoft.com. I will open Flow from here, and what this does is it opens the Flow homepage and it shows me all the Flows that I’ve created in the past. On the screen I will also click plus new, and then create from blind to create my new Flow. Now notice that on the next screen it gives me some suggestions. It shows me some of the popular triggers. It also gives me the option to search all the available connectors as well so that’s what I’m going to do. I click search hundreds of connectors and triggers, and now on this page I will look for Dynamics 365 because in our example we are wanting to create something in Planner when a record in Dynamics 365 is created.
So, from this list I’ll choose when a record is created in Dynamics 365, choose my organization name, and the entity that I want to trigger this Flow on. In our case our entity’s called Inspection Checklist. Just to quickly show you what it looks like, this is what it is. Okay, so it has a bunch of questions, name, et cetera. Going back to my Flow I will look for Inspection Checklist from this list and move on to the next step. In the next step I would like to add an action, right. So, now our action is that we want to create something in Microsoft Planner. In my search box right here I will just type in Planner, and it’ll show me all the actions that are available to me for this solution.
From here I can just say create a task, and now it’s going to ask me some questions. What plan do I want to create this task under? I want this under roofing inspection. What should be the title name? So, here we will say prepare for first visit with, and then we will have the name of the person, so which I can find from my Dynamics 365 entity. I also want to set up a due date, and the due date should be three days from the day the Dynamics 365 record is created. So, here I will use an expression called add days. I’m going to type in add days, add the parenthesis, and then I’ll have two parameters here. The first one would be the Created On date, which is right here, and then the number of days that I want to add, which is let’s say three. I also want to assign this to a certain user, so here I can add that user’s email address. Once this Flow is saved, we will go back to Dynamics 365 and create a new record. Once we create and save it, we will see that this Flow will run, and create a task in Microsoft Planner.
So, let me go back to my inspection checklist here, and I’ll create a new record, and we will say this is for Bailey Couture, and we save it. As soon as this is saved, within a matter of seconds we will have the Flow run. So, if I want to check how my Flow ran, I can go back here, and look at the run history. Very soon we will see the run history listed here, and even if it doesn’t we can still go into our Microsoft Planner from our Office 365 right here. Go to roofing inspection, and if I group by all the tasks assigned to users, we will see the task that was just created by the Microsoft Flow listed right here, and also notice that the due date is three days from now because we used that one formula. I can also look at how it ran in Microsoft Flow. In Flow, if I go into my Flow run history right here, this is where I can see if it succeeded or if it failed, and what exactly it did, and how it ran. So, you can see how a very simple Flow can make multiple solutions talk to each other.
Now, let’s dive in to the next scenario. So, to create our next Flow I’ll do the same thing that I did earlier, which is going to search hundreds of connectors and triggers. Now the first trigger that we want is when a record is updated. In our case we are waiting for an account in Dynamics 365 to get updated so all I do is search for record is updated and choose this trigger right here. When I do that it asks for my organization name, which I’ll choose from right here. Then what entity are we triggering this on, so that will be account.
So, from this list I will choose accounts. Now sequentially what needs to happen next is it will get a list of contacts, a list of related contacts, go through them, and update them one by one. For that to happen our next step would be to get a list of all the related contacts. So, I will just say, list records, choose this action right here. We know the drill, choose the organization name first, and what entity are we looking for this time? It’s the related contacts. From this entity name list I will look for contacts. Let’s click show advanced options because we want to filter this a little bit. First of all we want to update only the active contacts. So, for that we will say status code equals one, and we also want to set the parent account here, so for that we have a field called parent customer ID underscore value. Now, just know that this is actually a reference to the parent account lookup. We will set this to, let’s say equals, and we will set this to the parent account, which comes from this field or value right here.
So, my next step would be to update record. I’ll just search for update record, and choose this action right here. We know the drill, organization name, and the entity, which will be contacts still right there. The record identifier, that’s the grade of each of the contact that we need to update. That will come from this list that we have to the right, so I can just search for contact … It’s right there, so notice how it’s a unique identifier. Now as soon as I do that you will notice that it applies this loop to this step because it knows that we are going through a list of records. I’ll just say got it to this, and click on show advanced options also because now we need to find the field that needs to be updated. In our case it’s the company phone field so I’ll scroll to where we have the company phone, and this field will be updated to the main phone field from account. So, let’s just look for our phone fields. It’s right there. Okay, and that’s it. So, now all I have to do is click save, and once this Flow saves, every time I update the phone number of an account the phone number of the related contacts will get updated as well. I go into my account, and come to the phone number here, and we will change this to, let’s say 4477, and I say save.
Now once this is saved within a matter of seconds the Flow that we just created will run and update the phone number of the related contacts. Just to check let’s open one of the related contacts here. If I go into Susan here, and look at Susan’s phone number we should see the updated phone number here. As you can see here Susan, who’s a related contact, her phone number got updated, so similarly all the other related contacts that we have, their phone number will get updated as well. So, you can see how Microsoft Flow cannot only make solutions talk to each other, but also within Dynamics 365 if you have certain enhancements that need to happen you can just write a Microsoft Flow that will do those things for you. In the past for something like this you had to write a lot of custom code. You had to write a plugin, but now Microsoft Flow can do that for you.
We hope this video helped. Now don’t just stop right here, we have a ton of webinars, and videos, and blog posts coming up on our website so you keep an eye on that and keep learning. Thank you for watching.