How to embed a canvas app in your model driven app

Do you want to create a button in the forms in your model driven app? You could embed a Canvas App in your model driven app to do this.

Create a solution

I will start this post my creating a solution in Power Apps. This solution will hold the canvas app that I’m creating and the Model Driven App that I’m about to create.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 1

First I’m going tot add the Account table as I want to add a Canvas app to the form for the Account.

Add a Table to my solution
Add a Table to my solution

Now I’m adding a column called Canvas App to my table. You could use any required column you like. For this post however I created a new column.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 2

Create A Canvas App

I will create a simple canvas app inside my solution and I’m adding a button to this app. Once I’ve save and published the app, I have an app that will look like this:

Create A Canvas App
Create A Canvas App

Now that I have a canvas app and a column that will hold my app I can create a new model driven app.

Create a model driven app

My model driven app will only have the Accounts table included. You will probably find that in your apps you might have more tables included. It all depends on which tables/entities you want to use to embed a canvas app in.

Create a Model Driven App
Create a Model Driven App

Note that in my site map I’m selecting for the Entity the Account table.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 3

Then I can edit the form for my table.

App after Site map has been created
App after Site map has been created

Connect a Column with a Canvas app

In the forms editor you will notice the add component option. In the Microsoft documentation the same options are also shown in the classic interface, but there is no real need to use the classic UI anymore.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 4

Now it is time for the exciting part of this post. Embed a Canvas app into your Model driven app.

Embed a Canvas App

There are 3 options here. You could for example store the App id of the canvas app in a column and then use this to start your app. Just imagine starting a different app depending on where you are in your process.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 5

I’m going to use the easiest option whereby I’m setting the app id to a hard coded value.

First I will need to collect the App id of the Canvas app. By selecting Details from the apps menu.

Details of the Canvas App
Details of the Canvas App

now I will get to the following screen where the App Id is shown.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 6

A Quick copy and past of the app id will now help me to embed a canvas app in my model driven app.

Embed a Canvas App
How to embed a canvas app in your model driven app 7

Now I just need to publish the solution and test the app.

Test the App

Now when I open an account in my models driven app I can see that my Canvas app is appearing.

How to embed a canvas app in your model driven app
How to embed a canvas app in your model driven app 8

In this post I only added a button which for example could start a flow, but of course there are a lot more options available within your Canvas apps.

How are you planning to use this? Let me know and leave a comment below. I’m interested to hear your stories.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@sharepains.com

Related Posts

2 thoughts on “How to embed a canvas app in your model driven app

  1. Hello everyone, I need to embed a canvas button to a model driven app. I have already embedded the button, but it is very large. How can I reduce the area of ​​the app in the form?
    In addition, the button cannot be embedded on my main formular, do you have any ideas as to why this might be?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading