[Power Apps] New improvements in Embedded Canvas Apps which are undocumented / unannounced
Since the announcement of the general availability of embedded canvas apps in model-driven forms, we have not heard any update on the Embedded Canvas Apps space, no mention of it in the Power Platform: 2019 release wave 2 plan either. However, despite not hearing anything from Microsoft for any new features/improvements on the Embedded Canvas Apps, the product team has been busy working on it to streamline existing processes and add new/improve current functionalities.
The last update for the Guidelines on working with embedded canvas apps documentation was in 19th Aug 2019, and obviously, it is now outdated and several items are no longer valid since the new unannounced improvements were added. I also did not see anyone sharing those new improvements so that I decided to blog about it share the knowledge and hopefully, we will see the official announcement from Microsoft soon. Here are the new/improved functionalities that I found while working on embedded canvas apps as of Dec 2019.
If you try to enable more than three, you will get the following error message in the Form Editor.
The last update for the Guidelines on working with embedded canvas apps documentation was in 19th Aug 2019, and obviously, it is now outdated and several items are no longer valid since the new unannounced improvements were added. I also did not see anyone sharing those new improvements so that I decided to blog about it share the knowledge and hopefully, we will see the official announcement from Microsoft soon. Here are the new/improved functionalities that I found while working on embedded canvas apps as of Dec 2019.
- Enable three embedded canvas app per form
- Create embedded canvas apps using Save As
- Add existing canvas apps using App ID
- Add existing canvas apps using App name
- Keep embedded canvas app in different solution
1. Enable three embedded canvas app per form
Previously, you can only enable one embedded canvas app per form but now, it allows you to enable up to x3 embedded canvas app per form.If you try to enable more than three, you will get the following error message in the Form Editor.
2. Create embedded canvas apps using Save As
In the documentation, it was mentioned that "Embedded canvas apps can only be created via the host model-driven form" but there is another way to create an embedded canvas app. It is still true that ModelDrivenFormIntegration control cannot be manually added in the Power Apps studio but you can create another embedded canvas app by saving the existing canvas app with ModelDrivenFormIntegration control.
If you want to reuse the app for a different entity (e.g. the original one was for Account form, but you want the new embedded app for Contact form), you can add the CDS data source of the new entity in the app and update the DataSource property to the new entity data source name.
3. Add existing canvas apps using App ID
This documentation mentioned that, "Support to embed an existing canvas app in a model-driven form using App ID will be provided in a future update" but it is already supported right now.
In order to add the existing canvas apps (e.g. the one created using the Save As method in item 2 above) to the model-driven form, you need to get the App ID of the canvas app.
Click on the ellipsis menu on the right of the canvas app and choose Details from the menu
You can find the App ID in the Details page of the canvas app
Copy that App ID into the Canvas app custom control property and the existing app will just show up in the form.
4. Add existing canvas apps using App name
This is my most favourite feature from this list. This feature has been recently rolled out and is available in Oceania (crm6) region, not in US (crm) region just yet. It might be available in some other regions too but those are the only two regions that I have access to test this feature. With this update, you will be able to specify the embedded canvas app with the name instead of App ID.
Before this feature was added, you can only specify the App ID of the canvas to embed in model-driven form. When the form is deployed to higher environments (UAT, Production, etc.), the form is still referring to the App ID in the Dev environment and it needs to be manually updated to point it back to the app in the same environment.
But with this App name property, the model-driven form looks for the canvas app with the same name in the current environment first. Only when there is no such app with the same name is found in the current environment, it will fall back to the App ID and load the canvas app with the same App ID. If none of the apps match the App name or the App ID specified in the properties, the form will show the following error.
Normally, the App name is set automatically when the app is created via the host model-driven form.
But if you want to add the existing canvas apps to the model-driven form using the App name property, you need to add the app into the solution first.
Then, you can get the App name in the solution explorer Name column as in the screenshot below.
Copy that App name into the Canvas app custom control property. You can specify the App ID or you can set it as empty GUID 00000000-0000-0000-0000-000000000000. As long as there is a canvas app with the specified App name in the same environment, it will load correctly and event if you have an invalid App ID, it would not matter.
Before this feature was added, you can only specify the App ID of the canvas to embed in model-driven form. When the form is deployed to higher environments (UAT, Production, etc.), the form is still referring to the App ID in the Dev environment and it needs to be manually updated to point it back to the app in the same environment.
But with this App name property, the model-driven form looks for the canvas app with the same name in the current environment first. Only when there is no such app with the same name is found in the current environment, it will fall back to the App ID and load the canvas app with the same App ID. If none of the apps match the App name or the App ID specified in the properties, the form will show the following error.
Normally, the App name is set automatically when the app is created via the host model-driven form.
But if you want to add the existing canvas apps to the model-driven form using the App name property, you need to add the app into the solution first.
Then, you can get the App name in the solution explorer Name column as in the screenshot below.
Copy that App name into the Canvas app custom control property. You can specify the App ID or you can set it as empty GUID 00000000-0000-0000-0000-000000000000. As long as there is a canvas app with the specified App name in the same environment, it will load correctly and event if you have an invalid App ID, it would not matter.
5. Keep embedded canvas app in different solution
Even though the following guideline was specified in this documentation, it is actually working fine even though the embedded canvas app is in a different solution as the model-driven form.
When you view a model-driven form with an embedded canvas app, if you see an error message that reads "Sorry we didn't find that app" make sure that the embedded canvas app is in the same solution as the model-driven form.
Great catch on some of these Linn. I've been blogging about Embedded Canvas Apps as well. I want to share a warning about using option 2 or 3. This will not work when you are using multiple environments and want to transfer the model and canvas app using a solution to the next environment.
ReplyDeleteI've had contact with the product team that the link is done under the hood using the name and not the guid. So I'm really glad they are starting to roll out the name part on the host form you saw in option 4. Then scenario 2 and 3 will also work, but untill then watch out :-)
Thanks for sharing your thoughts and knowledge too.
DeleteIt is a good information for other other readers who come across this kind of scenario.
It is really helpful. Thanks for sharing
DeleteThanks for sharing this Linn. I was stuck with the deployment issues and couldn't find any documentation and blogs helpful. Your point that the appName is first checked by the form to look for the canvas app saved my day.
ReplyDeleteThanks for your efforts.
In my case, when I copied environment from DEV to UAT, the name of the app was staying the same for me and therefore even having the different AppID in both environments I was always getting redirected to the Dev canvas app. I have to delete the app and remigrate again to get the AppName different.
I am glad it helped you solved your issue. I will also report an issue in the Microsoft documentation to update it so that it will be beneficial for those who don't happen to reach to this blog post.
DeleteI have provided a feedback for the Microsoft Docs about embedded canvas app and the documentation has been updated with the latest info including "the steps to add the existing canvas app with app name and app id"
Deletehttps://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-add-classic-designer?WT.mc_id=DX-MVP-5003873
Thank you for sharing those valuable information, like the name to be specified !!! That help me troubleshoot my issue when deploying between environments
ReplyDeleteBlog : https://www.collabmania.com
I'm glad the post helped you troublshooting the deployment issue. 😊
DeleteThank you for this information! The App name feature made my day and also resolved issue with deployment :)
ReplyDeleteGood to know about it, Oksana. Thanks for your comment.
Deletegreat finding , worked as mentioned
ReplyDelete