Advanced Retrieves via WSProxy

You can perform more complex retrieves, including the ability to set other properties on the retrieve request, including SOAP RetrieveOptions.

  • The first three parameters are the same as the parameters in simple retrieves.
  • The fourth parameter specifies the properties on the RetrieveOptions on the request.
  • The fifth parameter specifies any remaining properties to set on the request. These properties include “QueryAllAccounts”, “RepeatLastResult”, “RepeatAllSinceLastBatch”, and so on.

To retrieve more pages, use the getNextBatch function.

  • The first parameter is the object type.
  • The second parameter is the RequestID from any previous retrieve.

This example loops through every email in an account and writes the Name property, then outputs the total number returned after outputting all of the items.