web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / CRM TIPS By PRM / Change main logo to company...

Change main logo to company logo on top navigation – Dynamics CRM

P. R. M Profile Picture P. R. M 739

It is a general requirement that clients ask to replace the Dynamics CRM main logo to their own company logo.

CRM doesn’t provide an OOB way to update the logo. So, we need to update the system file (Main.aspx) to achieve this. [With CRM 2015 update1, updating the CRM main logo is a CRM OOB functionality. We can achieve this with Themes concept]

Below are the steps to replace the logo:

  1. Copy Company Logo (Ex: CompanyLogo.png) into below path of CRM web server:

%Program Files\Microsoft Dynamics CRM\CRMWeb\_imgs

  1. Get the Main.aspx file from CRM web server from below location:

% Program Files\Microsoft Dynamics CRM\CRMWeb

  1. Add below script block between <Head>…</Head> tags
  2. Add “updateLogo()” function on onload event of page as below:

<body scroll=”no” onload=”updateLogo()”>

Script block

Note:

  • Change image name from “CompanyLogo.png” to your logo image name
  • Change the organization name from “CRMORG1” to your organization name
  • Image specification should be “140X7”


function updateLogo()
{
var img = document.getElementById('crmUserInfo').getElementsByTagName('img')[2];
//Img tag will not load initially on opening AF, Records. So, need to check and repeat the operation with Timeout.
if (img == undefined) {
setTimeout(updateLogo, 1000);
}
else {
var URL = window.location.toString();
var CRMORGLOGOPATH = '/_imgs/CompanyLogo.png';
var b_unit = "";

if (URL != null) {
var res = URL.split('/');

if (res != null) {
b_unit = res[3];
}
}

if (b_unit.toUpperCase() == 'CRMORG1') {
img.setAttribute('src', CRMORGLOGOPATH);
}
}
}

Note:

  1. From the above script, logo will be changed to “CompanyLogo.png” for the organization “CRMORG1” and default logo will be displayed for all other remaining originations in the server.
  2. If you want to display different logo for each organization then write else condition with img source with required image path.

if (b_unit.toUpperCase() == ‘CRMORG1’) {
img.setAttribute(‘src’, CRMORGLOGOPATH);
}
Else if (b_unit.toUpperCase() == ‘CRMORG2’) {
img.setAttribute(‘src’, CRMORGLOGOPATH);
}
….

Hope this helps someone…  :)



This was originally posted here.

Comments

*This post is locked for comments