How to restrict a record producer available for only with the groups with the parent company as ABC

Sheetal18
Tera Contributor
 
13 REPLIES 13

Dhruv Chandan
Giga Guru

Hi,

 

There are user criteria that can be defined to restrict the visibility/ access of a record producer. Please see the below link for details :-

 

https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/service-catalog-management/...

 

Hope this helps.

 

Regards,
Dhruv

Immanuel Raj
Tera Contributor

Navigate to User Criteria and create a criteria using script with your conditions.

Add the criteria to you record producer in the "Available For" related list.

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

Yes it looks fine.