How to restrict a record producer available for only with the groups with the parent company as ABC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 11:12 PM - edited ‎03-27-2023 11:12 PM
Hi @Sheetal18
If you already have the user criteria then add that criteria to Available For related list and If you don't have user criteria to satisfy your requirement then create a new user criterion and then add to the Available For related list. Check the advance check box and add script for that user criteria.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2023 01:37 AM
can u help me with some code..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2023 02:15 AM
checkUsers(gs.getUserID());
function checkUsers(user){
var Agr = new GlideRecord('sys_user_group');
Agr.addEncodedQuery("u_par_company=ABC^active=true");
Agr.query();
if(Agr.next()){
answer = true;
}
else {
answer = false;
}
return answer;
}
pls check above code whats wrong in this its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2023 02:20 AM - edited ‎03-28-2023 03:15 AM
Can you elaborate your requirement?
Also in the code declare the answer variable in function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2023 03:19 AM
A record producer has to be available for , only the groups with the parent company as ABC. We have u_par_company field on group table