Hide Related List for all users except admin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 07:11 AM
I would like to hide the related list for all users that are not an admin. Is this one with a client script of UI policy?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 07:23 AM
you can use onLoad client script and hide the related list
Hiding Related Lists and Embedded Lists
function onLoad(){
// if not admin
if(!g_user.hasRoleExactly('admin'))
g_form.hideRelatedList('task_ci'); // give the correct name of related list
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader