The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Advance User Criteria Scripting

vidhya_mouli
Giga Sage
// Load the user record from customer_contact table
var user = gs.getUserID();
var userGR = new GlideRecord('customer_contact');
userGR.get(user);

var parentAccountName = userGR.account.account_parent.name + '';
var targetAccountName = 'Test Super Parent 001';

var answer = (parentAccountName == targetAccountName);

 

Not sure why this script is not working.

 

5 REPLIES 5

@vidhya_mouli 

in background script you passed which contact user's sysId?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader