Thursday, April 14, 2016

Display Dynamics pages in a dashboard : I want the Service Calendar and my Agenda on my dashboard

Microsoft Dynamics CRM offers some out-of-the-box pages, based on records on your organization, like the well known Service Calendar or the Agenda. According to your needs, these pages can become very useful but it is sometimes handy to reach them via the site map, especially if you use CRM 2013 or 2015. In this article, I will describe a very simple tip to add one of these custom pages directly in a system dashboard.

The underlying method is simple and needs no development. The key point is to find the URL of your page and to display it in an IFrame on your dashboard ; where the most difficult part is to find the URL of your page.
Let's say we want to display the Agenda on a dashboard. As the Agenda is displayed on the site map, the easiest way to find it is to extract the URL from the site map in the XML format. To do this :

  • Create a new solution and add the sitemap as below.

  • Export the solution, unzip it and open the file Customizations.xml
You can see here that the whole site map is included in the "SiteMap" XML node, and each "tile" of the site map is represented by the SubArea node. I will not fully describe how the site map is built in this article, you just have to note here that for the custom pages (like the Agenda or Service Calendar), the relative URL is included in the SubArea node (as below) :
As shown in the picture above, the relative URL of the Agenda is '/workplace/home_calendar.aspx'. I let you find by yourself the one for Service Calendar.
Now that you have found your URL, you can add it on a dashboard, embedded in an IFrame.
So create a system dashboard, add an IFrame on it and set the parameters as below. Notice that as Iframes do not support relative URLs, you must add the client URL (https://<org>.crm.dynamics.com for CRM Online for example) before the relative one you found at the previous step.
And you're all done ! You can now add other components on your dashboard, publish it and look at what you have done so far :
Finally, we saw in this article a very simple way to display a out-of-the-box custom Dynamics page in a dashboard. It still has a slight drawback : if you want to include your dashboard on a solution to import it in another organization, it will not work properly, as the URL parameter of your frame is set to your source organization. The simplest way to handle this is to modify the "hard coded" URL after importing package but you can also (in order to avoid to take care of this) rather use a HTML Web Resource, that displays the same Iframe but, using the getClientUrl Javascript function, that gets the URL of your organization dynamically. If this is, I think, the nicest way to take care of this drawback, it requires a little of Javascript development.

1 comment:

  1. One of the most popular Microsoft Dynamics CRM Plugins of ours is the Inventory Manager For Dynamics CRM. It is a powerful MS Dynamics CRM App for all your needs to manage your Inventory related tasks using the CRM. Starting from stock booking to invoicing, warehouse management, auto-generate low stock POs, manage returns, and more. Our solutions are value for money products.

    ReplyDelete