- My View
I have an LDAP connection to the sys_user table pulling records from LDAP to the SNow User table.
My goal is that, if sys_user.u_status field is Expired, then the email mapping has a source script that will not allow the email address to be updated. Unfortunately, I'm not sure how to script this out. Any help is appreciated.
This is what I have so far:
var gr = new GlideRecord('sys_user'); gr.addQuery('u_status','Expired'); gr.query(); gr.next();
Try this one
answer = source.field_name; //Change email field name from import set tbale
Mark Correct /Helpful /Like based on the effect of response.
That worked perfectly! I understand the script; writing them is a different story. Thank you for your help.
if we want to skip the update i think you can use onBefore client script with ignore true, in that case the current row transformation to be skipped,
var gr = new GlideRecord('sys_user');
gr.addQuery('user_name', 'provide the name here');
ignore = true;
PS: Your feedback (Like, Helpful or Correct) helps community