How to Show Notes (Annotations) on a Model-Driven App Dashboard
Model-driven apps in Power Apps allow users to create dashboards that display key data from different entities. By default, dashboards do not provide an easy way to display Notes (Annotations). However, using a combination of dashboard customization and XrmToolBox, you can modify a dashboard to include a list of Notes. This article provides a step-by-step guide to achieving this.
Step 1: Create a New Dashboard
- Navigate to the Maker Portal.
- Create a new dashboard.
- When adding components to the dashboard, insert a List for any entity (e.g., Accounts). The selected entity does not matter, as we will modify it later to display Notes.
Step 2: Obtain the Notes View ID
- In the Maker Portal, navigate to an existing View for the Notes (Annotations) entity or create a new custom view.
- Once the view is open, copy the View ID as it will be needed later.
Step 3: Install XrmToolBox and FormXml Manager Plugin
- Download and install XrmToolBox from https://www.xrmtoolbox.com/.
- Install the FormXml Manager Plugin.
- Connect to your Dataverse environment where the dashboard was created.
Note: If you don’t have access to use XrmToolBox, you can also update this FormXml by creating a new unmanaged solution and adding in just the dashboard you created earlier. Then export and unzip the solution, you will find the FormXml within the customizations.xml file. Perform the updates as described in the next step, then re-zip all the files and reimport the solution.
Step 4: Modify the Dashboard’s XML
- Open FormXml Manager in XrmToolBox.
- Click Load Dashboards and select Dashboard in the entity list.
- In the FormXmls pane, find and select your custom dashboard.
- Click Edit FormXml to open the editor.
- Locate the control corresponding to the List component added in Step 1 (e.g., the Accounts list).
- Modify the XML as follows:
- Change the label from:
to:<label description="Accounts" languagecode="1033" />
<label description="Notes" languagecode="1033" />
- Change the target entity from:
to:<TargetEntityType>account</TargetEntityType>
<TargetEntityType>annotation</TargetEntityType>
- Update the View ID with the one copied earlier:
<ViewId>{e7b7272b-dcee-ef11-be21-00224804c479}</ViewId>
- Change the label from:
- Click Update and Publish the changes.
Step 5: Verify Changes in the Model-Driven App
- Return to your Model-Driven App.
- Open the Dashboard.
- The list that previously displayed Accounts should now display Notes instead.
Conclusion
By following these steps, you have successfully modified a Model-Driven App Dashboard to display Notes (Annotations) using XrmToolBox. This method allows for greater customization of dashboards to meet business requirements.
Comments
Post a Comment