In Chapter 3, Creating a Dashboard, readers were introduced to the six different dashboard layouts that are provided using the Dynamics CRM dashboard editor. This recipe will show the reader how to quickly create a custom layout that includes three tab sections.
This recipe will create a new dashboard and export a solution package. Please refer to the previous recipe Exporting a dashboard from Dynamics CRM for detailed information on how to export the solution package.
Carry out the following steps in order to complete this recipe:
Field |
Value |
Notes |
---|---|---|
Display Name |
CRM Organization Overview Dashboard | |
Name |
CRMOrganizationOverviewDashboard |
This value will be generated from the Display Name field. |
Publisher |
Default Publisher for orgebeb7 |
There will be at least 1 default publisher for your CRM instance. |
Version |
1.0 |
customizations.xml
file in an XML editor such as Visual Studio. Only the<Dashboards>
element has data; this is where the changes will be made: FormXML
elements directly. Locate and copy the last<tab>
element in the<tabs>
collection. Refer to the Understanding FormXML section later in this recipe for more information about the schema used in FormXML
dashboards:<tab>
element, so that there are a total of three<tab>
elements in the<tabs>
collection, as shown in the following screenshot:<tab>
element's id
attributes. If you are using Microsoft Visual Studio, there is a Create GUID function located under the Tools menu: GUID
replaces the id
attribute value for the<tab>
element: GUID
replaces the id
attribute value for the<section>
element: GUID
replaces the id
attribute value for the<cell>
element: .zip
will need to be created, so that it can be imported back into Dynamics CRM. Using Windows Explorer, locate the three files that were unzipped in the earlier steps and compress them into a new .zip
file.Filename Versioning
It is a good suggestion to version compressed files to keep track of the newest one when importing. For example, the original export package was named CRMOrganizationOverviewDashboard_1_0.zip
and after the changes were made, the new compressed file for import was named CRMOrganizationOverviewDashboard_1_1.zip
.
Although there are more FormXML
changes that can be made using the XML editor such as changing cell heights and widths, or modifying text labels, the goal of this recipe was to create a dashboard layout that wasn't possible through the Dynamics CRM Dashboard Editor interface. The Dynamics CRM dashboard editor is still the preferred tool for adding charts, lists, and other components, as it provides a fast and easy WYSIWYG editor.
Microsoft Dynamics CRM comes with a freely downloadable feature-rich SDK that provides detailed in-depth information about the inner working of Dynamics CRM along with useful code samples and templates to speed up the learning process. You can locate the latest version of the SDK on Microsoft's website or by searching for Dynamics CRM SDK in your favorite search engine.
If you have downloaded the Microsoft Dynamics CRM 2011 SDK there will be series of XSD schema files available for use. The files are located in the SDKSchemas
folder. Including the XSD files in your XML editor as a validation schema allows you to validate and correct any changes that you make to the XML before importing back into the solution again.
In order to use the Dynamics CRM schema files, include a reference to the customizationssolution.xml
file. This is the top-level file for the customizations.xml
and will pull in the Dashboard FormXML
information as well. Depending on the XML editor you are using, the instructions for including an XML reference file may vary. Please refer to your product documentation for more information.
The following section provides a simple outline of FormXML
, as it is used in dashboards in Dynamics CRM. In order to get an in-depth review of the many different elements and attributes available in the Form XML mark-up, you should download the Microsoft Dynamics CRM SDK or search the online MSDN libraries for more information.
<Dashboards> <Dashboard> <FormId>{GUID}</FormId> <FormXml> <forms> <form> <tabs> <tab id="{GUID}"> <label/> <columns> <column> <sections> <section id="{GUID}"> <label/> <rows> <row> <cell id="{GUID}"> <label/> <control classid="{GUID}"> <parameters> <VisualizationId/> <ViewId/> …etc… </parameters> </control> </cell> </row> </rows> </section> </sections> </column> </columns> </tab> </tabs> </form> </forms> </FormXml> </Dashboard> </Dashboards>
3.22.181.47