sfmc // SSJS / WSProxyPROJECT

WSProxy Retrieve with Pagination

Retrieve SOAP objects beyond a single response page using RequestID / getNextBatch().

ssjswsproxypaginationsoap
Context Pack →Open Workspace →
Trust & provenancePROJECT
Evidence tierPROJECTOfficial sources0Other sources0Last verifiedNot recorded

Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.

<script runat="server">
Platform.Load('Core','1.1.1');
var prox = new Script.Util.WSProxy();
var cols = ['Name','CustomerKey','CategoryID'];
var response = prox.retrieve('DataExtension', cols);

while (response) {
  for (var i = 0; i < response.Results.length; i++) {
    // process response.Results[i]
  }
  if (!response.HasMoreRows) break;
  response = prox.getNextBatch('DataExtension', response.RequestID);
}
</script>
Operational notes

Use bounded processing and checkpoints for large accounts.

Treat this as a building block; object properties and filters vary by SOAP object.