- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 06:50 PM
Hi Experts,
Good day!
I just want to ask your expert opinion on how to control show/hide of related list using UI policy.
I created UI policy that should control the show/hide of Related List name (task_sla.task) using below conditions and
with the g_user that will check the user role based on below specific roles
I would appreciate any help help regarding this matter.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 08:33 PM
Hi @Michael Galang you dont need to pass sysid under hasRole. You need to use like below
Refer documentation: https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/client/c_GlideUserAPI#r_GlideUs...
var isItil = g_user.hasRole('itil');
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 02:36 AM
Hello @Michael Galang
Instead of using Else conditions you can use g_form.hideRelatedList for a specific role that the user has.
Please hit Helpful if it helps