How to show only options based on roles or groups?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:47 PM
Hello experts,
If I want to only display a select options to certain or role or group, what do we use?
In this sample I would only one to display in progress, on hold and resolve to one group only,
Can UI policy handle this?
regards,
Vaine
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 10:36 PM
you can use onLoad client script if you know the role for which you want to show options
something like this
function onLoad(){
if(!g_user.hasRoleExactly('Role Name')){
// user doesn't have this role so remove the options
g_form.removeOptions('state','choiceValue');
}
}
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 05:29 PM
Thanks,
I will try your suggestions