how to exclude related list action in CSM workspace from specific role

Alon Grod
Tera Expert

Hi,

how to exclude related list action in CSM workspace from specific role, for example 'itil' role:

Screenshot 2026-02-25 115155.png

1 ACCEPTED SOLUTION

@Alon Grod 

admin inherits all role so it will hide as that condition will be false for admin user

try this

!gs.hasRole('elcam_user') || gs.hasRole('admin')

💡 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

View solution in original post

20 REPLIES 20

Dr Atul G- LNG
Tera Patron

https://www.servicenow.com/community/service-operations-workspace/how-to-display-hide-related-list-u...

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

@Ankur Bawiskar i think i can use the script condition field but when im trying to do:
!gs.hasRole('itil') its not working

@Alon Grod 

I shared a strong reason why this requirement need not be done with detailed analysis above.

Please check and inform customer

55.png

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

@Ankur Bawiskar its removing the button for 'admin' as well:

Screenshot 2026-02-25 123851.png