CRM Masthead Customization for Multiple Organizations

Paul Nieuwelaar, 23 June 2010

A few weeks ago, a blog was posted by David Sutton called CRM Masthead Customization, and it was explaining how to customize the masthead in CRM. However if you have multiple Organizations in your CRM environment, the masthead will be added to all Organizations, rather than having a unique masthead for each Organization.

Sebastiaan Klaver from Herke ICT Group came up with a solution to this, so that you can have different mastheads for each Organization in your CRM environment.

Sebastiaans method is described below:

 

To customize the header for MSCRM I used this blog post:
http://www.magnetism.co.nz/blog/10-05-10/CRM_Masthead_Customization.aspx

But i wanted to go further and have a custom masthead logo for each organization in my MSCRM enterprise environment.

To accomplish this you have to complete the following steps:

  1. Create the new header images.
  2. Locate the header definitions in the MSCRM CSS file.
    In my environment it was located under e:\inetpub\wwwroot\_common\styles\global-dynamic-styles.css.aspx
  3. There are 2 places that you will need to edit the CSS file; 1 for the background image and 1 for the logo.
    - Background-image is defined under “TABLE.ms-crm-MastHead”
    - Logo-image is defined under “TD.ms-crm-MastHead-Logo”
  4. To change the CRM logo for each organization, I added an if statement to check the URL, and lookup the organization name which is always displayed in the URL.

    Add another else if statement for each MSCRM-organization for both the TABLE and TD.
    (In my environment I only changed the logo, but you can do the same for the background.)

    Example:

    TD.ms-crm-MastHead-Logo
    {
    height: 58px;
    background-repeat: no-repeat;
    padding: 0px 15px;
    <% if (CrmStyles.IsRightToLeft) { %>
    background-position: top right;
    background-image: url(/_imgs/masthead_rtl.jpg);
    <% } else if (Request.Url.AbsoluteUri.Contains("orgname")) { %>
    background-position: top left;

    background-image: url(/_imgs/masthead_orgname.jpg);
    <% } else { %>
    background-position: top left;
    background-image: url(/_imgs/masthead.jpg);
    <% } %>
    }


    The code in bold and italics will need to be added where it is shown above, where orgname will be the name of the Organization, and where it has /_imgs/masthead_orgname.jpg will be new location of the masthead logo.
  5. To change the background as well, do the same for the background image in TABLE.ms-crm-MastHead, and specify the background image location.
  6. The header image will change after pressing CRTL+F5 in CRM.
  7. The header image in the sign in page (if using IFD) will also change.

Of course this solution is not officially supported by Microsoft, but I think it’s a good way to play around and give MSCRM a more personal flavor ;-)

Follow Sebastiaan Klaver on Twitter.