How to Hide catalog item on service portal based on users country
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 12:24 AM
Hi All,
I have an requrement where the catalog item should be hidden on portal if the currently logged in user's country is Finland . Any guidance will be helpful.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:09 AM
Can you please check the user record of this user you are trying with?
and confirm the value present in field backend named 'Country'.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 12:45 AM
Hi Saket,
The most efficient way to implement this would be to use "User Criteria". Please follow the below URL for details :-
Hope this helps.
Regards,
Dhruv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 12:50 AM
Share your user criteria script here
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-05-2023 12:51 AM
var country = 'Finland';
usr.get(gs.getUserID());
if (usr.country == country) {
retVal = true;
} else {
retVal = false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 01:38 AM
can you share complete script?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader