Appointment creation using Microsoft Flow with multiple attendees in D365
Hello Guys,
In my previous blog we have seen basics of Microsoft Flow and how to create Flow in Power Automate from the scratch. Today we will create another flow which will create Appointment with multiple attendees. But before if you are new to our blog then do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.
In our one of blog i have shown you how to create Appointment using workflow. If you have not read that blog then you can read it from here.
Also if you are new to Microsoft Flow then please read my this blog: Microsoft Flow in D365.
We will be using same entities which are as below:
Here we have N:N relation between Program and Trainee which means many programs having multiple trainees.
Now we want when we change the status of the program, an appointment should be sent to all the trainees who have enrolled for that program.
Program Entity:
Trainee Entity:
We are having below trainee list.
We have created one Program named "Dynamics 365".
Now we will be creating a Flow which will be triggered when status will be scheduled. Below are the steps:
Step 1:- Navigate to https://us.flow.microsoft.com
Step 2:- Click on My Flows. Click on New -> Automated Flow. Give the name of the flow as below:
Step 3:- Type "When Record is updated" in the search box and create update trigger as below. Also rename the trigger:
Step 4:- Click on new step. Search "Get a Record". Select the trigger and configure it as below:
Step 5:- Here we will initialize one variable which is type of Array and it will hold trainee data.Click on new step, search "Initialize variable" select the action and configure it as below:
Step 6:-Now we will be checking the status which should be "Scheduled". To achieve this we will selecting "Condition" trigger.
Step 7:- If above condition will be true, we will perform next action. Click on Add an action in "If Yes" section. Search "List Records". Select the action and configure it as below:
Step 8:- Now we will be checking the count of the trainees which should be greater than 0 and then only we will perform next action. Click on new step. Select Condition Action and configure it as below:
Step 9:- If above condition will be true, we will be updating Trainee Array and will create a appointment. Click on Add an action. Select Apply to Each action and configure it as below:
Step 10:- Click on Add an action inside the apply action. Select Compose action and configure it as below:
Step 11:- Click on Add an action inside the apply action. Select Append to an array action and configure it as below:
Step 12:- Click on Add an action outside the Apply Each section. Select Create Record Action and configure it as below:
Step 13:- In the description set value as below:
Step 14:- Set Activity parties as below:
Step 15:- Save and close the Flow. Now change the status of the Program from "Upcoming" to "Scheduled". You will see one appointment will be created as below:
Hope it helps...
I wanted to be the first person to comment about this blog. Good, pertinent post .It's so nicely defined each and every concept through this blog, express an opinion or just say "Thanks!" So...thanks!
ReplyDeleteThanks for your nice feedback Priyanka...
ReplyDeleteWonderful Post. This is a very helpful post. These are the useful tips for. I would like to share with my friends. To know more about me visit here Microsoft Certified: Dynamics 365 Finance Functional Consultant Associate
ReplyDeleteThanks Nanfor. Kindly follow and share...
DeleteThe best Article that I have never seen before with useful content and very informative.Thanks for sharing info. MB-400: Microsoft Power Apps + Dynamics 365 Developer
ReplyDelete