As the lead developer for our
The idea behind a record-centric dashboard is that you take advantage of some of the awesome new real-time reporting functionality and the fact that you can create multiple forms for an entity in CRM 2011 to create a dashboard that contains charts and grids focused on a single record (like an account for instance). I liked this idea so much I built a record-centric dashboard for accounts in our Energy Distribution solution focused on the financial information that we receive from the ERP integration that we provide as part of the vertical. Here is the result:
Creating a record-centric dashboard
Creating a record-centric dashboard is pretty straight forward. Here are the basics for you:
- Open the entity that you want to add the dashboard to (this is usually the entity that you want to use to filter the data). For accounts you would navigate to Sales, then Accounts.
- Select the “Customize” tab in the ribbon
- Click the “Customize Entity” button
- Click “Forms” in the solution tree
- Click “New” and then choose “Main Form”.
- In the form editor remove all of the existing fields, sections, and tabs
NOTE: You will not be able to remove required or locked fields from the form. For the Order History dashboard that I created I added a tab to the form that I called “Hidden” and I unchecked the “Visible by default” checkbox then I moved any required fields that I didn’t want on the form to this tab.
It is also important to note that you will not be able to remove all of the fields from the form. If you try you will find that at least one field will always display even if you uncheck the “Visible by default” checkbox in every field that you left on the form.
When you are done you should have something that looks kind of like this:
Click “Save As” in the ribbon and give your dashboard a name. This name will display in the form selector dropdown so you will want it to be something nice.
Adding content to your dashboard
Now that you have a clean slate you will want to add Charts and Sub-Grids to your dashboard. To add content to your dashboard do the following:
Add any tabs (if you want the user to be able to collapse sections of the dashboard and / or want the user to be able to quickly jump to a section of the dashboard) or sections that you want to break up areas of the dashboard.
To add a chart, select the area of the form that you want to add the chart to and click the “Sub-Grid” button on the “Insert” tab of the form customization ribbon.
- In the “List or Chart Properties” select the entity that contains the chart you are trying to add to the dashboard (In my case it was our custom Order History entity).
- Give your chart a name.
- Select a “Default View”.
- Select a “Default Chart.” This will be the chart that you want to display on the dashboard.
- Click the “Show Chart Only” checkbox.
- Unselect the “Display Chart Selection” checkbox and then click the “OK” button.
There you have it; your dashboard now has content. The process for adding Sub-Grids is similar except don’t click the “Show Chart Only” checkbox.
Some gotcha’s and limitations
If you add more than 4 Charts or Sub-Grids to this dashboard you will notice that the charts and / or Sub-Grids will require the user to click a link to see the data. There is a workaround for this by adding some javascript to the form. Here is the basic code:
1. Add the following function to a javascript Web Resource:
function RefreshSubGrid(name) {
try {
var g = Xrm.Page.ui.controls.get(name);
if(g != null) g.refresh();
}
catch(e) {}
}
2. Add the javascript Web Resource to your form if it isn’t there already.
3. In the form’s onload event add a call to RefreshSubGrid and in the parameters box add the name of the chart surrounded by quotes (for example to refresh the chart I defined earlier in this article I would use “CurrentVsPriorGrossProfit”).
I would be careful not to go too overboard with grids or charts on an entity form otherwise there will be a noticeable delay to the user.
I mentioned earlier that there has to be at least one visible field on the form. You will want this field to appear at the top of the form otherwise the form will open focused on the location where you put the field. I believe that this field cannot be marked read-only initially, but can be marked read-only in javascript in the onload event.
By default only the System Administrator and System Customizer roles will have access to this dashboard. You can fine tune this by clicking the Assign Security Roles button in the form editor. In the Assign Security Roles dialog you can choose either the security roles that should see this dashboard or select the “Display to everyone” radio button.
CRM is set up to remember the last form that you used to view an entity. This means that if the dashboard was the last form that you opened to view an account the next time you open an account you will see the dashboard instead of the main form. It is possible to work around this feature by adding some javascript to redirect the user in certain cases.
One final enhancement idea
In his blog post, Richard Knudson mentions that you can remove the left navigation. The caveat is that you then can’t see the form selector and will not be able to navigate back to the main form. One way I found around this would be to add a pair of buttons to the ribbon, one button that will navigate the user to the main form and another to navigate the user to the dashboard. The buttons can be disabled based on the form that you are on. I did a version of this for my work and it works great.
As a
By Ledgeview Partners –
Cool - nice idea!
I enjoyed reading this article. You mention adding a pair of buttons to navigate - do I take it you hide the navigation pane using javascript as opposed to using the checkbox on form properties? Our buttons don't work if we use the checkbox. Just checking that I'm not missing something obvious! Thanks.
This web ѕite truly has all the info I wanted about this ѕubject and didn't know who to ask.
My homepage -Auto Accident Attorney Ogden
This is the perfect web site for anybody who would like to understand this topic.
You unԁerstand ѕo much its almost tοugh to argue with yοu (not
that І аctually will need to…ΗaHa).
You certainly рut a new spin on a toρic that haѕ been discussed fоr decades.
Wonԁeгful stuff, juѕt excellent!
Also ѵisit my wеbѕite:visalus review