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

Ankur Bawiskar
Tera Patron

@Alon Grod 

what's your actual business requirement?

you want to hide/show NEW in related list for which table and on which form? share screenshots

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

@Ankur Bawiskar hi its not for native its for workspace:

Screenshot 2026-02-25 120705.png


 I want to hide 'new' button based on role, it a ux related list action 

@Alon Grod 

so this is for contacts related list

itil is not allowed to create that's fine but who should be allowed to create?

You can simply ensure whoever you want to see NEW button passes the Table.None CREATE ACL on Contact table

With this no need to update any related list action etc.

💡 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

@Alon Grod 

Why would ITIL user go to CSM Workspace? They primarily work on SOW workspace.

I just impersonated with ITIL User and went to CSM workspace.

that user is not able to see Case List itself in LEFT NAV

Then why this requirement?

55.png

even if I went to customer_contact.list from left nav with ITIL User, the list itself is not seen due to ACL Issue

55.png

💡 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

@Ankur Bawiskar i just gave example as 'itil'. ignore the name of the role, how can I hide ux related list action (sys_declarative_action_assignment) based on Role