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
Faizan Ali 17Faizan Ali 17 

Change colour on event - Visualforce

Hi all

I am new to coding and would like some guidance.

I have this table here:

Table example
I would like to change the colour of one of the cells within the table if the contact is available at a certain time.

I have a controller class that handles my code and a separate CSS file for the styling.

Could someone guide me or link something that will allow this to happen?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Faizan,

So, is it that you have contacts that have fields that are present to state in which timings the contact is available?

I think this one can suit more if it is implemented in a lightning component.

Looking forward for your response.

Regards,
Anutej
Faizan Ali 17Faizan Ali 17
So for example there is a checkbox in the contact object that is either an 'Appointment' or 'Diary'.

If the contact selects Appointment it will display a red colour.

If the contact selects Diary it will display a yellow colour.

What will be the easiest and best way to achieve this?