Catalog Item Visibility Based on Dynamic Role Pattern (x_*) Without User Criteria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi Community,
I have a requirement where a specific Catalog Item should be visible only to:
- Users with the itil role, or
- Users who have any role that starts with x_
Normally, I would implement this using User Criteria, but in our instance the system property glide.sc.use_user_criteria is disabled due to other business requirements, so User Criteria is not an option.
There are over 200 roles that begin with x_
Thanks
@Ankur Bawiskar @Dr Atul G- LNG @Allen Andreas @Hardit Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13m ago
then you can use onLoad catalog client script + GlideAjax
the script include would validate if logged in user has itil role or has any role starts with x_
if not then it shows an alert to user and directly takes user to portal homepage
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
