After creating a WebResource in the Creating an HTML WebResource component recipe, the following steps will add that WebResource to a dashboard.
Getting ready
Navigate to the Settings area in Dynamics CRM 2011.
How to do it...
Carry out the following steps in order to complete this recipe:
Navigate to the Customization module in Dynamics CRM and click on the Customize the System link.
This will launch the Solution Editor dialog showing the Default Solution for Dynamics CRM 2011. Click on the Dashboards link located in the left-hand navigation section.
A listing of system dashboards will be shown. Double-click on the IFrame and WebResource dashboard record in this list. The Dashboard Editor screen will open, as shown in the following screenshot:
Select the empty placeholder component and click on the Insert Web Resource link as shown in the following screenshot:
This will launch the Add Web Resource dialog. Click on the lookup icon to see a listing of the available form-enabled WebResources for this dashboard:
Locate and select the new_AreaCode_TimeZone_Search WebResource from the list and then click the OK button, as shown in the following screenshot:
Once the WebResource has been selected, provide a value for the Name and Label fields. Click on the OK button to save the settings:
Now the dashboard will have two components on it, the first is an IFrame and the second is the new WebResource. Click on the Save and Close button on the ribbon toolbar:
Once you have published all the changes, navigate to the Dashboards section in the Workplace area and view the updated dashboard, shown in the following screenshot:
There's more...
Adding a WebResource to Dynamics CRM allows you to extend the feature set and functionality of your CRM solution. WebResources can also be designed to interact with your system by accepting parameters at runtime.
Passing a custom parameter (data) to a WebResource
The Dynamics CRM platform can also pass parameters to the HTML and Silverlight WebResources using the data parameter to retrieve information. This is the only custom parameter that is recognized by the WebResources and it is set in the Web Resource Properties window, shown in the following screenshot. If you need to send multiple values through this single parameter, you will need to encode them and have the target WebResource split and decode them at runtime: