Embedding Canvas App on a Model-Driven App’s Form (Preview)


Login to Dynamics 365 CE, open any of the Entity’s form and either pick any of the existing single line of a text field or sub-grid control or add one to the form.

We will use Single Line of Text if we want to pass the current record as context and Sub-Grid if we want to pass the list of related records as context.

In this post, we will first see how to pass the current record as context.

For this let us open Lead form and select Topic field which is a single line of text for customization (Change Properties).

Select Controls tab, and click on Add Control and choose Canvas app.

Here Entity name is auto-populated by the selected Entity and although it seems editable, changing it will have no effect.

App ID is auto-generated on creation of canvas app.


Let us click on Customize to create our canvas app. This opens the PowerApps Studio.

ModelDrivenFormIntegration is the special control which provides us the contextual data from our form.

Clicking on Edit for the Fields property for the gallery1 control opens a pane that shows all the fields from our lead entity.

Let us change the Layout to Title, subtitle, and body and set Body1 to the description, Subtitle1 to Fullname and Title2 to Subject.

Now before saving and publishing the app, go to File à App Settings à Advanced Settings

Set Enable app embedding user experience as On.

Save the App to the Cloud. This also publishes the app.

Back in our form editor, we can see the App ID auto-populated

Select Web option for the Canvas App in the Controls Tab.

Click on Ok to close the form, followed by Save and Publish.

We can see the Canvas App in the form in the Unified Client Interface

Although the app doesn’t make much sense, it gives an idea on how to configure things for embedding it within form. This feature really opens up infinite possibilities.

Get all the details here

https://powerapps.microsoft.com/en-us/blog/enrich-your-model-driven-forms-with-embedded-canvas-apps-public-preview/

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/pass-current-embedded-canvas-app

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embed-canvas-app-in-form

Hope it helps..

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

9 thoughts on “Embedding Canvas App on a Model-Driven App’s Form (Preview)”

  1. Hi,
    I am not able to see the “Canvas app” control on the control tab of the selected field properties on any entity form.

    Please let me know how it can be achieved.
    Thanks.

    Like

    1. Hi Shweta,

      This feature is currently in preview.
      Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

      This feature is currently available in all regions, except the US and Europe. It should be available in the US and Europe early January 2019. If you want to try the feature right away, you can create an environment in regions where it is currently available such as Australia, Canada, India, or Japan.

      https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embed-canvas-app-in-form

      Like

        1. Though, the trail CRM (Version 1710 (9.1.0.2034) online ) I am using in India region, still I am not able to see the Canvas App I have embedded as per the above steps mentioned by you.

          Like

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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