Using Color codes in Option Set Items – Dynamics CRM 2016

Dynamics CRM 2016 overwhelms customers and consultants alike. There is no denying the fact that indeed, this has been a giant step forward be in terms of user experience or the rich set of functionalities, especially for our on-premise customers who have made the leap from CRM 2015 to CRM 2016.

And among these big set of feature release, sometimes very subtle yet powerful changes gets overlooked. One of that is the availability of extra metadata attribute called ‘Color’ for an optionset field. Not sure how many of you noticed it, but CRM now comes with an additional option of specifying the color for each option item in the optionset.

image

So let’s see how this field can be used.

The first thing to notice here is that you can specify the color code for each of the option items in hexadecimal value. For example – I have taken here the priority optionset and added three different colors for the three option items

High – Red

Normal – Green

Low – Blue

image
image
image

I save and publish the customization changes. These colors will be actually used in the interactive service dashboards. If you are not aware of the interactive service hub for CRM 2016, you can view the MSDN Documentation for the same by following the below link.

https://www.microsoft.com/en-us/dynamics/crm-customer-center/user-s-guide-for-the-new-interactive-service-hub.aspx

I have customized the Dashboard for interactive service hub to show a bar chart of cases by priority. You can access the interactive service hub for your organization by typing in the url in the format

<organization url>/engagementhub.aspx

When I opened the engagement hub for my organization, I can see the chart displayed with the colors I specified for each of the High, Low and the medium values.

image

Isn’t it cool? Just thinking how can you use it more. Well if you have some external application which reads data from the CRM and shows some chart, you can probably read the optionset metadat, get the color code and render the chart with the same code in CRM.

Hope this helped!

Debajit Dutta
Business Solutions MVP

6 thoughts on “Using Color codes in Option Set Items – Dynamics CRM 2016”

  1. Thanks for this. I looked at it and never found where is this color goes. so you have clarified.
    I have a question. if you want to show this color in Cases for different priority, is there any solution to highlight the field based on Priority with respective color?

    1. Hi Swarnakanth,
      Color codes for option sets works only for interactive service Dashboards and this feature is there for only CRM 2016.
      Can you let me know if it is not working in Interactive Service Dashboards?
      Regards
      Debajit

  2. After changing some option set colors, my graph on the ISH dashboard actually disappeared; the shapes are all black now! I can see my expected colors’ hex codes in the DOM, but they appear to get overridden by some other style on the page.

Comments are closed.