Table Load More not loading all Records

  • 1
  • Problem
  • Updated 2 years ago
  • Acknowledged
  • (Edited)
I have a table that is loading Campaign Members, the model had a LIMIT of 20. There were 106 members in the Campaign and Skuid was only (eventually) loading 66 when clicking Load More. 

I looked at the table SOQL and discovered that there were two reasons why this was happening:
A. The first load more was using an OFFSET that was double the LIMIT. So if the limit is 20, it initially loads with no offset and then load more loads an offset of 40 instead of 20.
B. If there is no ORDER BY specified, OFFSET doesn't work properly in soql.

When I added an ORDER BY it loaded 86 (point A) and as I kept lowering the LIMIT it was increasing the amount that was eventually loaded with Load More (point B).

Interestingly, on my Account table Load More seems to increase the soql LIMIT to 10000, so perhaps the issue would not exist there.
Photo of Menachem Shanowitz

Menachem Shanowitz

  • 1,074 Points 1k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
This is an issue we see from time to time and seems to originate direclty from the Salesforce's Standard Set Controller.  Its happening beneath anything that Skuid can control. 

We have usually been able to create a workaround though.  If you add a second field to your model "default order by" property it seems to reliably return the correct number of values. The code we put there was:  

We are exploring with Salesforce and others whether this issue is in their code or our implementation.   We hope to have it fixed soon, but in any case the workaround is available for you and should solve the immediate problems you were facing. 
Photo of Jaime


  • 1,220 Points 1k badge 2x thumb
Hey Rob,

Is there an update on this issue?