In Dynamics 365 CRM, we have views which gives quick reference for records. While exploring Canvas apps, we found a new feature which helps us to display the views in the Canvas apps.
In this blog, we are going to display the views in Canvas app using CDS connector. In Dynamics 365 CRM, we have provision to see different views on different entity such as; on Account we can see different views as shown in below screenshot:
To achieve the same in PowerApps, create a Canvas app with Common Data Service as Data Source and select the required entity as shown in below screenshot:
Here, we have selected the Account entity.
1. After adding Data Source, add below controls on Canvas app screen as shown in screenshot:
- Account Views – Blank Screen
- Account Grid – Data Table Control
- Views – Dropdown Control
Add the Dropdown and Data Table controls as highlighted in below screenshot:
2. Set Account entity as source entity for Account Grid (i.e. set items property of Account Grid). See below screenshot:
3. Change the item property of Dropdown (i.e. Views) to show the available views of Account entity as shown in below screenshot:
The ‘Accounts (View)’ is present in the account entity data source. It stores all account views name.
4. To filter the Account Grid, we need to again change the Items Property of Account Grid as shown in below screenshot:
We are done with changes, now simply run the application and Account Grid will show data based on selected value of dropdown:
Thus, with the help of CDS connector you can easily display Dynamics 365 CRM ‘Views’ in Canvas app.