Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1023

SF Connector: Paged query fails when _pagedResultsCookie > 2000

    Details

      Description

      Attempting to page past the 2000th result when querying Salesforce via the ICF Salesforce Connector fails with the following REST response:

      Caused by: org.identityconnectors.framework.common.exceptions.ConnectorException: Error: 400
      [{"message":"Maximum SOQL offset allowed is 2000","errorCode":"NUMBER_OUTSIDE_VALID_RANGE"}]

      Paging within the Salesforce Connector is implemented using the SOQL OFFSET clause which is limited to the first 2k results. See the following from the Salesforce SOQL reference:

      The maximum offset is 2,000 rows. Requesting an offset greater than 2,000 results in a NUMBER_OUTSIDE_VALID_RANGEerror.

      To reproduce the issue query a Salesforce Org which contains >2k Users with the following Query:

      http://localhost:8080/openidm/system/00Dq00000001QDD/User?_queryId=query-all-ids&_pageSize=2000&_pagedResultsCookie=4000

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cgdrake Chris Drake
                Reporter:
                cgdrake Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: