Skip to main content
You can retrieve a Person list is with the GetPersonList method available through the PersonAgent. To use this service, we must know the IDs of the people we want before we can make the call. If we do not know the ID, we need to use a different service, for example, a method like GetPersonsFromContact.
A list of PersonIds is passed into the GetPersonList method, which returns an array of Person data types. Once the values have been assigned to a Person type array, we may access the properties of each person by looping through the array elements. Output:
We could also have used the Person agent’s GetPersonsFromContact method since we are just reading some simple properties out of the results. GetPersonsFromContact returns simple read-only carriers. Another option is to use the ContactAgent.