Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 2 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Embedded canvas apps are generally available since last month! This will be another way to create richer experiences for users using your model apps. Embedded canvas apps only work in the Unified Interface. In this blogpost I will show you how you can easily replace the deprecated dialogs with an embedded canvas app. In contrast to the PowerApps Component Framework, which I previously blogged about, this is a low code solution.
Dialogs were a great way to guide users through more complex decisions . Canvas apps are the Microsoft recommended way to replace dialogs. To showcase how you can replace your dialog I’ve created and implemented a fictive scenario.
Even though this is a simplified scenario. It would still require a lot of steps to do this by hand. So automating these steps benefits the user greatly. On top of that, we can start expanding based on this scenario.
To start, decide where you want to place your app. You can change the size of your canvas app to your liking, so you have a lot of options here. In my example I’ve created a separate tab with a list of tasks and the canvas app on the side. In the section you want your canvas app to appear, you need to place a ‘single line of text’ field. This feels a bit illogical but you need this to bind your canvas app control to.
I always create a new field when embedding a canvas app as this keeps me organized. You could however choose any single line text field. If you want to use the OnDataRefresh property in your app, be sure to use a single line text field which is required. Do not forget to remove the label of the field. A canvas app with a label would just look silly
The experience is really smooth. The app is generated inside your current working solution and it even creates a screen to get you started. The resulting form of the steps we’ve just performed:
Inside the canvas app we can start making our basic flow. For example I’ve added a few screens with basic navigation:
For now let’s focus on the screen “Perform credit check”. I’ve added a form screen and connected to a new CDS data source “Tasks” by pressing the “connect to data” link. Also change the default mode of the form to “new” as we want to create a new Task.
I want the user to enter a subject, due date, priority and description for the tasks. So I add them to the form. The Task should also be assigned to the Finance team and related to the current case. These are fields I don’t want the user to be able to change so I do not add them to the form.
The default action of the save button is “SubmitForm(EditForm)”. However I need to manipulate more data before the submit, so I use a Patch instead. On the “OnSelect” of the save button I do the following:
Let’s go through the script line by line.
In this first part of creating a dialog I’ve showed you how you can create the embedded canvas app. After that I showed the “Credit Check” screen. It got most interesting when we saved the screen. For now this is the end of part 1.
In part 2 I focus on finishing this screen. I desperately want to change the owner of the Tasks, but wasn’t able to using the CDS connector. I’ve tried multiple options available. But not even the Relate functionality helped me out! I do have a solution for this problem though, and for that I use Microsoft Flow.
Adding embedded canvas apps are a great piece of technology to enrich the user experience in Model Apps and Dynamics 365 Customer Engagement. This technology is easy to use and gives a lot of flexibility to tweak to all your needs, for instance. However not all scenarios are easily possible out of the box, sometimes workarounds are needed. Luckily we have the full power of the platform to support us
I highly recommend to explore the possibilities provided by embedded canvas apps. And I certainly will use them in most of my solutions.
The post Embedded Canvas App – Replacing dialogs – Part 1 appeared first on Power Addict Ben.
Business Applications communities