Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

display service catalog based on region specific by using user criteria

kaushalya1
Kilo Expert

How To display service catalog based on region specific by using user criteria

1 ACCEPTED SOLUTION

Keep it inside a function.




getRegion();


function getRegion(){


var user = new GlideRecord('sys_user');


  user.get(gs.getUserID());


                                                                                                                                          //   gs.log("user" + user);


  if(user.u_region == "2e9b7ebe4fa59240c5e604818110c72b")              


  {                            


                                                                                                                            //gs.log("region123" + user.u_region);


return true;


  }


else{


  return false;


  }


}




Thanks,


Mihir


View solution in original post

11 REPLIES 11

Thanks so much for your help... It worked


PeterWiles
Kilo Sage

Instead of creating a script, you can extend the user criteria table. User Criteria - ServiceNow Wiki