Issue with Paging in SOAP XML API – Only First 500 Records Retrieved

I am having an issue with a web service connector I am building for a SOAP XML API, where the paging steps are not working as expected. I followed the examples here Paging Based on Request Body Configuration to build the steps below.

The request Body :


<soapenv:Body>

<sms:GetEmployeesReqMsg>

<sms:requestHeader>

<crm:version>1.0.0</crm:version>

<crm:businessCode>1</crm:businessCode>

<crm:messageSeq>${=new Date().format("yyyyMMddHHmmssSSS")}</crm:messageSeq>

<crm:beId>101</crm:beId>

<crm:channelType>601</crm:channelType>

</sms:requestHeader>

<sms:includeRoles>true</sms:includeRoles>

<sms:pageInfo>

<com:pageSize>500</com:pageSize>

<com:startNum>1</com:startNum>

</sms:pageInfo>

</sms:GetEmployeesReqMsg>

</soapenv:Body>


The paging tab


$pageSize$ = 500

TERMINATE_IF $startNum$ > $totalNum$

$startNum$ = $startNum$ + $pageSize$

$request.PageIndex$ = $startNum$

The issue that I always got the first 500 employees only.

Hi @Mostafa_Baraka,

how are you build the url?

Hi @enistri_devo

It have been solved by this script in paging part.

$sysparm_limit$ = 500
TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$
$offset$ = $response.sms:pageInfo.com:startNum$ + $sysparm_limit$
$request.sms:pageInfo.com:startNum.text()[1]$ = $offset$