Run User Criteria on the basis of Session URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2023 11:45 AM
Hi Community,
I am having a scenario in which I want to run User Criteria for a record producer only for Agent Workspace.
In short I want to restrict the user criteria for Portal. For that the below user criteria script is written but this is not working.
var url = gs.getProperty("glide.servlet.uri") + gs.action.getGlideURI();
var userRec = new GlideRecord("sys_user");
userRec.addEncodedQuery('location.country=INDIA^active=true');
userRec.query();
if (url.indexOf('workspace') > -1) {
if (userRec.hasNext())
answer = true;
else
answer = false;
}
Your reply will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2023 11:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 02:08 AM
Hi Rahul,
Thanks for your reply over the thread, I tried your mentioned script but this is not working as expected. The record producer is visible in both Service Portal & Agent Workspace but we want to restrict it for Service Portal.
Thanks, your reply will be helpful.