Need help restricting specific related lists on the Incident table using ACLs based on user roles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi everyone,
I’m new to working with ACLs in ServiceNow, and I’ve been given a requirement where a few specific related lists on the Incident table (such as Change Tasks and Task SLAs) should not be visible to users who do not have the admin role.
I’ve checked several community posts, but most examples show ACLs applied when a field value is triggered or changed, not directly for related lists.
In my case, the requirement is simple: only a few related lists should be hidden from non-admin users, while the rest should remain visible.
Could anyone guide me on how to achieve this or share an example ACL configuration for this scenario?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hi @azurei
You have to write onLoad client script in Incident table
Script:
function onLoad() { // Check if the current user does NOT have the 'admin' role if (!g_user.hasRole('admin')) { // Hide the "Change Tasks" related list
g_form.hideRelatedList('change_task.parent'); // Hide the "Task SLAs" related list
g_form.hideRelatedList('task_sla.task'); } }
Review this KB: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0758509
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP