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.

User Criteria for Catalog item not working

Omkar Jori
Tera Expert
Hi All,
I have a custom field named Responsible branch office in User table.
I only want to show the catalogs related with that branch to the user.

I used below user criteria script but its not working.
answer = checkCondition();

function checkCondition(country) {
var user = new GlideRecord('sys_user');
user.addQuery('sys_id',user_id);
user.addEncodedQuery("u_responsible_branch_office=42393ff3835132107f59e530ceaad3fb");
user.query();
return user.hasNext();
}
0 REPLIES 0