- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 04:36 AM
Hello,
Can someone know how to restrict catalog item visibility? catalog item must be only visible specifically for users with authorization level 3 and above. I already created a user criteria and attached it in my catalog item but it is still not working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 08:11 AM
please share your user criteria and script
Ensure you add that in "Available For" Related list of your catalog item
Script something like this, but please enhance
var userRec = new GlideRecord('sys_user');
userRec.addQuery('sys_id', user_id);
userRec.addQuery('u_authorization_leve', '3'); // give your proper query here
userRec.query();
answer = userRec.hasNext();
You can also test this using User Criteria Diagnostics
Debug user criteria of a catalog item
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 06:18 AM
Hi @leviii
Ideally, it should show the user's criteria.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0812994
.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 07:56 AM
HI @leviii
Please share the User criteria you configured?
Click on Advanced and refer below sample logic (change the field name and value acordingly)
var grSysUser = new GlideRecord('sys_user');
if (grSysUser.get(user_id)) {
if (grSysUser.u_level == '3') //change the field name and value acordingly
answer = true;
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 08:11 AM
please share your user criteria and script
Ensure you add that in "Available For" Related list of your catalog item
Script something like this, but please enhance
var userRec = new GlideRecord('sys_user');
userRec.addQuery('sys_id', user_id);
userRec.addQuery('u_authorization_leve', '3'); // give your proper query here
userRec.query();
answer = userRec.hasNext();
You can also test this using User Criteria Diagnostics
Debug user criteria of a catalog item
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2025 08:01 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader