Search This Blog

Saturday, April 16, 2022

Replace Dialogs with Microsoft Flow

 We all know or should know that Microsoft Dynamics 365 Dialogs have been deprecated. When introduced Dialogs allowed a Functional Consultant to create an interactive step-by-step data entry form. The replacement options now are either business process flows or Canvas Apps. Both of which are reasonable alternatives and the latter, embedding PowerApps presents some really exciting possibilities.

But what if you need something a little simpler and perhaps utilize something you have already built? If it is a Microsoft Flow I will show you the simple steps you can do to embed an Button Flow into the Dynamics 365 Customer Engagement application.

Let’s consider this business scenario.

You have a busy Sales Exec at your company that refuses to login into the Dynamics 365 application to see what is going on with Opportunities. This person keeps emailing or calling you to have you email them a list of all the new Opportunities. I am going to keep this scenario simplified in the blog post but you can take what you learn and make it more complex.

Let’s imagine that previously you created a Flow Button and installed the Flow app on the Sales Exec’s phone. All the Exec had to do was to open the Flow App, tap on the Button and it would send directly to the exec a list of all the new Opportunities created in the last 24 hours.

But now the Exec calls you and keeps changing the time frame. And also refuses to even use the Flow App.

So your idea is to take the original Flow Button and modify it so you can vary the time for new Opportunities and it is business logic you can kick off from within the Dynamics 365 Web Client were you, as the Sales manager, live all the time.

Step 1 – Take the existing Flow Button and make a copy.

Microsoft Flow Make a Copy

Step 2 – Edit the Flow to delete the Manually Trigger a Flow Button element.

Microsoft Flow Delete a Button Trigger

Step 3  – Insert the Common Data Service When a Record is Selected Trigger. This will cause the Flow to be available from the Toolbar Flyout from the Opportunity Grid View. Add an Output field to prompt you to enter the number of days you want the report to cover for new Opportunities.

Microsoft Flow When a Record is Selected

Step 4 and a little more – here we need to initialize a variable, then set the variable with the output from the prompted question so we can use it in the Get Past Time Step.

Microsoft Flow Initialize Variable

Step 5 – There is nothing else we need to do except modify the To: field in the Send an Email Action. For the purposes of the blog post I am retrieving my own email address as the executor of the Flow. You could either hard code your bosses email address here (I don’t have a boss, I own the company. 🙂 ) or you could add to the prompt for the recipients email address and use it in this later step.

Microsoft Flow Retrieve Filter Records

Step 6 – Now go to the Opportunity Grid View, select one row (this is required, doesn’t matter which record) and then click as shown in the image below.

Microsoft Flow Run from Dynamics 365 CE

Step 7 – After clicking on the Copy of – Receive… link, the Flow ‘Dialog’ Window will open up. Now respond the prompt and enter the number of days.

Microsoft Flow Dialog like Prompt

Step 8 – With a little bit of luck will see a screen as follows with all green check marks meaning your Flow has run successfully. The email to your Exec will have been sent out.

There is much more you can do with the process. I just wanted to show you the basic framework to get you started. Happy Flowing!

Microsoft Flow Successful Run

Microsoft Flow Send Email


No comments:

Post a Comment