Show Textbox border and change tab color in Dynamics CRM 2013

Show textbox border and change tab color in CRM 2013

Out client has a requirement to show the textbox border and change the color of tab on a specific page. The textbox boarder is enabled in CRM 2011 by default however it’s removed in CRM 2013.
To enable the same I create web resource for the CSS file, and override an existing class/id. Then use JavaScript to add a reference to the CSS file.

Before & After change:

 

Javascript:
function LoadCSS() {
var head = document.getElementsByTagName(‘head’)[0];
var link = document.createElement(‘link’);

var path = Xrm.Page.context.getClientUrl() + “/WebResources/_cssfile”;

link.rel = ‘stylesheet’;
link.type = ‘text/css’;
link.href = path;
link.media = ‘all’;
head.appendChild(link);

}

CSS:
.refresh-form h2.ms-crm-Form{color: indianred !important;}
.refresh-form td,.refresh-form h3.ms-crm-Form{color: indianred !important;}
.ms-crm-Inline-Value{ border: solid 1px lightgrey; !important; }

 

Author: Zhe Chen
Title: Lead Dynamics CRM Consultant
Email: zhechen@adisys.co

Advertisements

One thought on “Show Textbox border and change tab color in Dynamics CRM 2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s