Hope you are all well!
It’s been a while since I last wrote, I got super busy with my community events and the new work life.
I will try to be as regular as possible on my posts.
Today, I am sharing everything I know about using an embedded canvas app in Dynamics 365 and Model Driven Apps; this will be more of a guide.
How many apps can I embed on a form?
Three canvas apps at a time, per form on web and one for Phone or Tablet.
Is there a workaround to use more than three apps on the web for?
Yes, use a webresource with your app URL and adjust the height and width. You might need to pass a parameter in your app depending on what the app is for. (Not the best result but a workaround)
What do I need to consider if it’s the first canvas app of my organisation?
If this is your first app, you might want to cross check security roles of users who’re going to use this app within Dynamics 365 as you need to provide additional privileges, assuming you’ve been using Dynamics 365 already. The privilege is called ‘Canvas App’, minimum read privileges will be required.
Is there something specific I would need to communicate to the users on the launch day?
- Users will see a sign in screen first time and must sign in.
- Users will need allow access.
- Session will timeout in case of inactivity and users will be required to sign in again.
How to share an embedded canvas app?
In the maker portal, click the ellipses to share the app. You can share the app to everyone or specific users. The easiest way to share with a group of users (if you don’t have a security group) is export users to excel and transpose to a row with comma separated aliases. This is not the fastest way if you want to share with a small number of users like 3-5 but 50-100.
Special control ModelDrivenFormIntegration and related actions
|Item||Access the record on which you embed the app||ModelDrivenFormIntegration.Item.InvoiceID|
|SaveForm||Saves the record on which you embed the app||ModelDrivenFormIntegration.SaveForm()|
|OpenQuickCreateForm||Opens a quick create form of the table specified (default form in case you have more than one quick create||ModelDrivenFormIntegration.OpenQuickCreateForm(Contacts)|
|RefreshForm||Refreshes the record on which you embed the app||ModelDrivenFormIntegration.RefreshForm(true)|
**true or false is for the pop up message of unsaved changes on the model driven form
|NavigateToView||Navigates user to a view of the specified table||ModelDrivenFormIntegration.NavigateToView(Accounts, ‘Active Accounts’)|
|NavigateToMainForm||Navigates user to a form of the specified table||ModelDrivenFormIntegration.NavigateToMainForm(Contacts, ‘Unified Interface Contact Form’, ‘GUID’)|
**Opening ‘Modal Dialog’ form via ModelDrivenFormIntegration is not possible at this stage.
Enable or Disable an embedded canvas app
On the field properties control tab👇
Why can’t I see my embedded canvas app?
Make sure you’ve the following things in place:
- You’ve the right license.
- You’ve the right privilege in your security role.
- You’ve enabled third party cookies and local data.
I am a system administrator but cannot see my embedded canvas app
It will not appear until you first save the form meaning if the record is not created then you will only see a blank space.
How can I get related data in embedded canvas app?
On most forms in Dynamics 365 and Model Driven apps you will at least have one look up field. And to be able to get data out of it, you cannot use the special control directly i.e. ModelDrivenFormIntegration.Item.PriceLists.Name would not given you any result but error. Instead use, LookUp(Invoices, Invoice = ModelDrivenFormIntegration.Invoice).’PriceList’.’Name’
Try and use a required field to link/embed the app to. If not, try auto-populating default data via a business rule or JS because if your field is blank then your app will not refresh in context of any data changes on the form where the canvas app is embedded.
That’s all I have to share. I will try and keep adding to the list. If I have missed on something, please comment and I will add it to the list.
Hope it helps!
5 thoughts on “Everything You Need to Know About Embedded Canvas Apps”
Amazing article. Thanks for the sharing.
Glad u found it helpful.
Thanks for reading!
Awesome article. Can you please add deployment issues as well if possible ?
Good point, will add it soon. Thanks!