- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 08:47 AM
Hi Friends
I am working on some catalog item, and I have to restrict this catalog item based on user country,
I have tried using available with advance script like below, but its not working,
Any idea, or any other way we can achieve this?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 08:52 AM
Hi,
Try this instead:
checkCondition();
function checkCondition(){
var user = new GlideRecord('sys_user');
user.get(gs.getUserID());
if (user.location.country == "USA")
{
return true;
}
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 08:52 AM
Hi,
Try this instead:
checkCondition();
function checkCondition(){
var user = new GlideRecord('sys_user');
user.get(gs.getUserID());
if (user.location.country == "USA")
{
return true;
}
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 09:02 AM
Thanks for replay, but no luck Kieran,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 09:32 AM
No luck as in its allowing all users to see the item or preventing all users to see the item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 09:44 AM
Catalog visible to every one