- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 09:01 AM - edited 06-21-2023 09:13 AM
Hi,
I have a catalog item that I only want visible for one specific region: APAC (region is a custom field on the user table). I have a configured a user criteria (not available for) on the catalog item.
All regions selected except APAC.
However, the catalog item is still visible on the portal, even when the user's region isn't APAC.
Any tips on how to hide this catalog item from all regions except APAC? Any help is appreciated.
EDIT: I've flushed the cache, but no success.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 09:06 AM - edited 06-21-2023 09:07 AM
Wouldn't it be easier to make the catalog item "Available For" 1 region versus "Not Available For" 6 different regions?
Making it Available For the APAC region would hide it from all others automatically.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 10:12 AM - edited 06-21-2023 10:16 AM
Admins have an override that allows them to see all catalog items. You can read more about that here and how to get around it if needed.
https://www.servicenow.com/community/developer-forum/user-criteria-to-exclude-admins/m-p/1608714
Admins will always see the Catalog Items (Record Producer and Order Guides) despite the User Criteria denying the access.
Reason: System Property "glide.sc.entitlement.override" allows Admins to see all the Catalog Items
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 09:10 AM - edited 06-21-2023 09:12 AM
Also, with Region being a custom field you may need to use a script for the User Criteria. I would create an APAC Region User Criteria and use it in the Available For. Just check Advanced on the User Criteria and use a script similar to below:
checkCondition();
function checkCondition() {
var user = new GlideRecord('sys_user');
user.get(user_id);
if(user.u_region == 'apac') {
return true;
}
return false;
}
Once you add this User Criteria to the "Available For" section, it would hide the item from everyone not in the APAC region.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven