Friday, May 25, 2012

Basic Help Visor Modifications

The help visor appears above most the core system entity view panes in CRM 2011. It provides links to related sections of the help documentation as well as links to different areas of CRM that are related to the current entity. With a little work, it can be modified to show just about anything you can come up with that can be translated into HTML and JavaScript.
If you don’t already have a copy of the CRM 2011 SDK, download yourself a copy. You’ll need to get all the files inside the folder: \sdk\resources\getstartedpanetemplate\helpvisor and copy them to a new folder that you’ll be working in. This contains all the files needed to create a custom help visor that looks and behaves like the stock ones included with CRM.
The objective here will be to make a few small changes and get the new help visor deployed to CRM. After that, the sky is the limit as to what can be done.
From Visual Studio 2010, you can use File –> Open –> Website and browse to your new folder to have easy access to all the files.  First open \1033\helpvisortemplate.htm. If you are using languages other than English, you’ll need to create a new folder with the corresponding language code for each and copy in helpvisortemplate.htm.
Currently the template should look like this:
Here is the section of code we’ll be changing:

Update the text and title attributes in the title and description sections to something different and save the file.
Next create an empty solution, we’ll eventually use it to house all the needed resources.
The easiest way to get the template files into CRM is to use the Web Resource Upload Utility that is also include in the CRM 2011 SDK. You can find it in the \sdk\tools\webresourceutility folder. If you haven’t used it before, you’ll need to compile it before you can use it.
Once you enter your connection and credential information you should be able to select from the available solutions that are currently installed for your organization. Choose the empty one you just created. Select New Package and give it a name and select the path containing the copy of the template files you have been working with. Select all the resulting files and Add Files to Web Resource. Once you have done so, select Upload All.
In order to get our new help visor to display in CRM, we’ll need to make an edit to the site map file. Open your help visor solution, and then include the Site Map from the Client Extensions area. You will also need to include the entity for which you want the help visor to appear over. For the purpose of this example, I chose the Account entity. Save and then export the solution files.
Open customizations.xml and look for this code:
Change it to this:
It is important to note that the path needs to match up exactly with what the Name property of the helpvisortemplate.htm is in your solution’s Web Resources after you uploaded it to CRM.
Once you have saved your changes and replaced customizations.xml inside your solution zip file, go ahead and import it into CRM. When that completes, Publish All Customizations.
Now when we go to the Sales –> Accounts area, we will see our customized help visor.