Jul 2, 2013

Change colour of Fonts, Sections and Tabs

Though Microsoft Dynamics CRM 2011 forms are nicely presented, there could be instances that you may need to change the colours. It can be for branding purposes or to improve useability aspects. Most of them could be done through loading Java Scripts. We will check some of basics here.

In these codes colour can be determined by HTML code or standard name.
Click this for a basic list of such names and relevent HTML codes.

1) Fonts and backgrounds of the Fields

//Colouring the background of the label
document.getElementById('new_name_c').style.backgroundColor="CornflowerBlue";

//Colouring the field value
document.getElementById('new_name').style.color="#8B0000";

//Colouring the label
document.getElementById('new_contactperson_c').style.color="DarkOrange";

//Colouring the background of the field value
document.getElementById('new_contactperson').style.backgroundColor = 'Gold'


2) Tabs

document.getElementById("tab1").style.backgroundColor = '#F0E68C';
 


3) Sections

document.getElementById('{883d8330-156d-e4e5-130b-934752157dd3}').style.backgroundColor = 'DeepSkyBlue';


We will look into much complex colouring options in another post.

No comments:

Post a Comment