loadAllRemainingRecords is actually limited

  • 1
  • Problem
  • Updated 1 year ago
https://docs.skuid.com/latest/en/skuid/api/skuid_model_model.html#skuid.model.Model.loadAllRemainingRecords

This function fails to mention that SOQL queries can't be offset any more than 2000. As soon as want to do this the function fails to return any errors. Nothing happens after the last loadnextoffset. The remaining actions/js doesn't run.
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,236 Points 20k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,236 Points 20k badge 2x thumb
BTW .... the workaround for this is to use a snippet.

The approach is to query with sorting by Id. At the end of each query check to see if canRetrieveMoreRows is true. If so set a condition on Id to be greater than the last Id and query again.

Basically a function that calls itself if canRetrieveMoreRows is true and sets a condition before calling itself.

I've exported 10's of thousands of records without issue.