How to restrict service catalog for VIP user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2016 03:33 AM
I wanted to restrict the visibility of one particular catalog for all VIP users of a particular domain. Please help.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2016 05:14 AM
Hi Mihir,
Thanks for the reply. I believe user criteria feature is available from fuji version and my instance is on dublin version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2016 05:27 AM
Hi Shilpa,
Follow below procedure to give catalog item access in in the version before Fuji.
1. Go to the maintain item. Personalize form lay out and add Entitlement script and save.
Then write below script:
var urerref = new GlideRecord('sys_user');
urerref.get(gs.getUserID());
if(urerref.vip=='false'){
answer= true;
}
else{
answer= false;
}
Please go though the below link for your reference
Legacy:Service Catalog Access Controls - ServiceNow Wiki
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2016 06:51 AM
Thanks Mihir, it's working fine now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2022 07:15 AM - edited ‎11-29-2022 07:28 AM
write this below script in user criteria
checkVIPUsers();
function checkVIPUsers(){
var returnflag = false;
var userref = new GlideRecord('sys_user');
userref.get(gs.getUserID());
if(userref.vip=='false'){
returnflag = true;
}
return returnflag;