How to Highlight Reference Field in Workspace When User Has No Email

SachinNasa
Tera Contributor

Hi Community,

In ServiceNow Workspace, I want to change the background color of a reference field to yellow — but only when the referenced user record does not have an email address.

I understand that direct DOM manipulation is not supported in Workspace, so my main question is:

  • Can this kind of conditional styling (like changing background color) be achieved using Client Scripts or any other supported method in Workspace?
  • If not, what are the recommended ways to visually indicate such conditions in Workspace forms?

Looking forward to your suggestions or best practices!
Thanks in Advance.

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@SachinNasa 

that's correct, DOM is not supported in workspace

You can try to explore field decorators

UI Builder Deep Dives: Field Action Decorator 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@SachinNasa 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Nishant8
Giga Sage
Giga Sage

Hello @SachinNasa, you can take a look at UX Highlighted Values option ( Now Experience Framework > Configuration Settings > UX Highlighted Values Configurations ) if that helps. There are a few out-of-the-box (OOB) configurations already available, such as for Priority, and you can create additional ones for any reference field you need. This option doesn’t fill the background of the field, but it can help make your field stand out in other ways.

I believe it doesn’t fill the background of a reference field in a list because the field includes a hyperlink to the respective reference record.

 

For e.g.

Nishant8_1-1761975621330.pngNishant8_2-1761975652251.png

 

Nishant8_3-1761975702141.png

 

Regards,

Nishant