function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ManojKumar MuthuManojKumar Muthu 

Differentiate a record by color based on the pick list value selected

Hi ALL,

I have a requirement where I have to display a record with a different color based on the picklist value selected.

I have created a custom object called "CaseComments"  Picklist field name "visible to" which has "Internal" and "external" as value, If I choose Internal the record should be in Blue color likewise if I choose External the record should be in Green color.

Thanks in advance.

 
Best Answer chosen by ManojKumar Muthu
Manohar kumarManohar kumar

Hi, 

Are you talking about changing text color based on a picklist selection? You can do this by making one extra var in the controller which will decide the color. And change this value when piklist value is changged. On the page write something like this ..

style="color:{!yourVar};" 

Plaese let me know if this helps you. 

If poossible pleae share some code. 

Thanks,
Manohar