- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 06:38 AM - edited 07-15-2025 07:03 AM
What I need is an ACL on the list view: users with the x_role should have access to records with the x_type. If they don’t have the role, those types of change requests should not be visible.
I tested this with a user who only has the itil role, and when I impersonate that user, the records are still visible. I need it so that only users with the x_role or the admin role can see those records.
Current ACL:
Type: Record
Operation: Read
Decision Type: Allow if
Name: Change Request
Script:
answer = (current.type == 'x_type') && gs.hasRole('x_role');
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 06:51 AM
Hi @Abigail ,
your answer should have and condition not or
answer = (current.type == 'x_type' && gs.hasRole('x_role'));
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 06:51 AM
Hi @Abigail ,
your answer should have and condition not or
answer = (current.type == 'x_type' && gs.hasRole('x_role'));
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 07:03 AM
No scripting required.
1) give your role in Roles section
2) give your condition in Conditions
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader