Quantcast
Channel: xCommunity : Popular Discussions - Discuss
Viewing all articles
Browse latest Browse all 932

How to use FindPersons with lastName and firstName?

$
0
0

Hi,

 

This is probably a very simple question, but I'm new to AlarmPoint. I would appreciate your help!

 

I'm using the Web Services Component. I want to search for a person by lastName and firstName. The only web service operation (as far as I know) that searches for people is FindPersons. However, it's search parameter is either targetName or attribute or customField.

 

I can't search by targetName, as I don't know the target name of the person.

 

I tried searching by attribute, using the code below, and got status of findPersonsReturn equal to "UNDEFINED_ATTRIBUTE". Here's the code:

 

SoapAttribute[] attributes = newSoapAttribute[2];

 

 

 

attributes[0] = newSoapAttribute() { name = "lastName", value = "Smith" };

attributes[1] = newSoapAttribute() { name = "firstName", value = "John" };

 

var findPersonsReturn = alarmPointWebService.FindPersons(user, password, clientTimestamp, clientIP, clienttOSUser, company, newPersonSearchParameters() {attribute = attributes});

 

Similarly, I tried searching by customField and got status of findPersonReturn equal to "UNDEFINED_CUSTOM_ATTRIBUTE":

 

SoapCustomField[] customFields = newSoapCustomField[2];

customFields[0] = newSoapCustomField() { name = "lastName", value = "Smith"};

customFields[1] = newSoapCustomField() {name = "firstName", value = "John"};

 

var findPersonsReturn = alarmPointWebService.FindPersons(user, password, clientTimestamp, clientIP, clienttOSUser, company, newPersonSearchParameters() {customField = customFields});

 

What's the correct way to search for people by given first and last name?

 

Thanks,

Elena


Viewing all articles
Browse latest Browse all 932

Trending Articles