Secret ingredients to quality software


Do you know how to set the default chart for a table (previously known as an entity)?

Last updated by Tiago Araujo on 08 Feb 2021 07:34 pm (3 months ago) See History

Model-driven apps allow you to create multiple charts per table, ordinarily, the first chart is the default chart when opening the charts pane. Setting a system-wide default chart takes a bit more work.

default chart 1
Figure: The first chart in the list is the default

In the example above “Leads by Rating" is the be the default system-level chart of the Lead table. Some additional work is required to change the default. The easiest way of doing this is with XRMToolBox and the Advanced Chart Editor plugin.

  1. Open the Advanced Chart Editor, Load Entities, and Navigate to the table

default chart 2

  1. If changing the default chart to Leads by Source, select chart and export it

default chart 3

  1. Open the exported XML file in the text editor of your choice, and change the isdefault element to “true" and save the file

default chart 4

  1. Import the modified XML back into the Advanced Chart Editor and publish the changes

default chart 5

  1. Refresh the Table view, the updated chart should be the default chart in the list

default chart 6

Note: If the chart that was modified to be the new default is not at the top of the list, check the first chart in the list by exporting it and confirming the isdefault element is set to false.

Where there are two charts with the isdefault element set to true, these default charts will be at the top of the list and sorted alphabetically.

For example, if “Lead by Rating" and “Lead by Source" are both set as default then they would both be at the top and sorted alphabetically. The remaining charts would then be sorted alphabetically.

This can be desirable in some instances.

default chart 7
Figure: Two sorts, first alphabetical sort for the defaults, second alphabetical sort for the remaining charts

Mehmet OzdemirMehmet Ozdemir

We open source. This page is on GitHub