Catalog UI Policy

ash_1998
Tera Contributor

i have a requirement to make "Employee Search " field variable mandatory,

( Note - but for user with job profile is "90000007 -GBS accenture contigent worker" employee search field variable should be optional)

 

"90000007 -GBS accenture contigent worker" is the string value present in job profile field in user table.

 

I have tried by using below Catalog UI Policy script in execute if true section

var user = new GlideRecord ('sys_user');

user.addQuery('sys_id' , gs.getUserID());

user.query();

if (user.next()) {

return user.u_job_profile != '90000007 -GBS accenture contigent worker'

}

return false;

 

 

 

 

2 REPLIES 2

Shraddha Kadam
Mega Sage

Hello @ash_1998 ,

 

Can you please elaborate more on this? What is the exact requirement?

 

Thank you

If my response was helpful, please mark it as correct and helpful.
Thank you.

Thank you for your response.

 "employee search" variable present on the  HR generic form record producer

I have requirement to make "employee search" variable mandatory on form for all users except users who's job profile is "90000007 -GBS accenture contigent worker".

i.e. for user who's job profile is "90000007 -GBS accenture contigent worker" employee search" variable should be optional

 

Note - "Job profile" is the string field which present on the user table 

 

Thank you