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.

Query Ad activity output showing null

siva44
Tera Contributor

I have configured AD integration through workflow ad activites i need to send manager DN so i am trying the retrive the manager details through Query AD activity but is is showing null value

workflow runscript:

var obj = data.get(40).output;
 var newObj= obj.replaceAll('[', "").replaceAll(']', "");
 var string =newObj.toString();
 var parser = new JSON();
 var object= parser.decode(string);
current.work_notes ="data"+object;
 
siva44_0-1746624931328.png

 

 


1 REPLY 1

BrianProvencher
Giga Guru

Not sure if this helps, but we have the following in our LDAP sync to map the DN of the manager:

 

//
// The manager coming in from LDAP is the DN value for the manager.  
// The line of code below will locate the manager that matches the
// DN value and set it into the target record. To ignore the manager
// from LDAP, remove or comment out the line: ldapUtils.setManager(source, target);
//
// NOTE: The 'manager' field SHOULD NOT be mapped in the 'Field Maps' related list
// if the manager is brought in through an LDAP import.  The 'ldapUtils' scripts
// here and in the 'onComplete' Transform Map will map this value automatically.
ldapUtils.setManager(source, target);

// Set the source LDAP server into the target record
target.ldap_server = source.sys_import_set.data_source.ldap_target.server;//Deactivate LDAP-disabled users during transform based on 'userAccountControl' attribute matching the bitwise value of 2