How to create user criteria in hrsd .

smt
Tera Contributor

Hi there,

 

I want to create user criteria that
The user or employee which are not contingent worker only these user can access hr service on portal 
its scoped application need help

 

var user = new GlideRecord('sn_hr_core_profile');
user.addQuery("user",user_id);

user.addQuery("employment_type","contingent");
user.query();
if (user.next()){
gs.info( user.employment_type);
return "true";
}else{
gs.info("else");
return "false";
}

 

 

 

 

 

 

thanks

6 REPLIES 6

smt
Tera Contributor

I know that but I can not do scripting in that for more conditions.

I want ,that scripting i provided in the question is correct or does this required any changes whether requires return true or answer=true or just true ?

Susan Britt
Mega Sage
Mega Sage

As @Sean Antle mentioned, the easiest way to accomplish this would be to create the HR Criteria first, where you can use the condition builder to select the employment type field off the HR Profile.  Once the HR Criteria is created, you can use the Related Link from that record to create the associated User Criteria.