Change color of service calendar timeblock appearance in CRM 2013

The project I was working needs the service calendar feature in CRM 2013 and the business needs to customise the color of appointment based on the status.

Looked into the CRM 2013 SDK help file and discovered the way to achieve this, but the content was probably hasn't been updated for CRM 2013 due to UI change to flat style.


So, here is how to do it:


1. Create a new webresource of CSS type.
2. Set the Display Name to 'AppointmentBookConfig'.
3. Open the Text Editor and place the new CSS style in the content text box. Use the following format to define the new color.

div.ganttBlock[entityname]Status[statuscode]
{
    background-color: #FFC251;
}

For example, for Appointment with Free status:

div.ganttBlockappointmentStatus1
{
    background-color: #FFC251;
}

4. Publish and refresh the Service Calendar screen. You should now see the updated color of appointment timeblock.



Another tip, the CSS class is case-sensitive and must match the code specified in CRM website. You can find the file at this location C:\Program Files\Microsoft Dynamics CRM\CRMWeb\SM\Gantt\style\GanttControl.css.aspx. Open the file in text editor or Visual Studio if you have, you can find the exact CSS class name to override and specify it in the AppointmentBookConfig CSS webresource.

Comments

Popular posts from this blog

Request not supported new_xxx when calling Custom Action via WebApi

Error in workflow sending email: "You cannot send email as the selected user."

Field Security Profile Error