LDAP Extension, Search action breaks my action when no nodes returned

LDAP Extension, Search action breaks my action when no nodes returned

  

I'm using the Search method to return a path to a user node, filtered on the employeeNumber property. When the employee number is found in the OU, this works fine. I can use the resulting path to read and update the properties of the user using the LDAP extension's Property_GetValues and Property_SetValues.

However when the employee number is NOT found,  the Search action breaks on an "Object reference not set to an instance of an object" exception.  When no nodes are returned wouldn't the expected behavior be EOF() or EMPTY() ?

I'm passing in the following to the Search action:

Path: "LDAP://mydomain.lcl/OU=Users,DC=mydomain,DC=lcl"
Filter: "employeeNumber=(hardcoded for testing)"
FindOne: True
FilterScope: "Subtree"



 

I found the problem. If Search.FindOne=True, the Search method must return a result or the error occurs.

I changed the parameters to Search.FindOne=False, Search.MaxResults=1 which fixed it.

I'd suggest that this behavior be documented in the parameter's description, or the behavior be modified so that  null results when Search.FindOne=True doesn't break the method.



 

 
 
Where can i find this "Search" action? I have searched in References to add it but i dont see it ;(  i just want to query user information from AD if there is a matching username in my asset database :(