Security.searchUsers(userProperties); Security.searchUsers({key:value, ...})

Security.searchUsers(userProperties); Security.searchUsers({key:value, ...})

Anonymous
Not applicable
747 Views
2 Replies
Message 1 of 3

Security.searchUsers(userProperties); Security.searchUsers({key:value, ...})

Anonymous
Not applicable

I'm not sure that if Security.searchUsers(userProperties); Security.searchUsers({key:value, ...})  really works. Can anyone provide working sample script use this feature? Should I use lastName or LAST_NAME as key. the following codes do not work.

 

var usersFound  =   Security.SearchUsers({lastName:'vuong'});
var usersFound  =   Security.SearchUsers({LAST_NAME:'vuong'});

0 Likes
Accepted solutions (1)
748 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Ming,

 

This is the correct usage:

 

var usersFound  =   Security.searchUsers({lastName:'piggee'});

println(userFound)

Array [ID:piggeej userStatus:Y firstName:Joseph lastName:Piggee email:[email protected] workflowNotifyPreference:A batchNotifyPreference:A]

 

 

This will return an array of the properties for the user(s) your looking for.

0 Likes
Message 3 of 3

Anonymous
Not applicable

i can get the array back now. Thank you.

0 Likes