Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to change the color of the field in the related list.

VarisaraV
Tera Contributor

I want to compare the values in the parent form and related list record, and change color according to result of the comparison.

 

Here is the detail

I have u_project table. u_project table has related list u_task table. u_task contains many records. I want to check if the u_project table "updated by" user is the same as u_task table's updated by user in the related list. For any of the records in the u_task that have the same updated by user as the currently opening u_table form, I want to change the color of the related list field to green. If updated by user is different, I want to change the color of the related list field to red.

 

I have tried changing it in the System UI>Field Styles, but it does not work.

I have also tried using client script onload, but it also does not work.

 

Screenshot 2024-09-04 155535.png

 

Please guide me how to do it. Thank you very much!

2 REPLIES 2

Community Alums
Not applicable

Hi @VarisaraV ,

Please check this link below may be this will help 

https://www.servicenow.com/community/developer-forum/list-v3-for-related-lists-not-inheriting-quot-m...

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards 

Sarthak

Hello @Community Alums 

Thank you for helping. 

I have checked out the post you introduced, but it seems to be about the color of the list.

I would like to change the color of the related list. 

 

Thank you

Varisara