I have a page that uses AngularJS for front-end rendering and filtering. To make use of the dynamic filtering capability of AngularJS filters, I am loading all the records onto the HTML page, so the client has all the data and filtering is super fast. There are no viewstate problems since this page is totally Angular.

This works fine when up to 14000 records are returned to the UI. But once we hit 15,000 records, I get an error 'Visualforce Remoting Exception: Remoting response size exceeded maximum of 15 MB. ' I used {buffer:false} on the request on this page.

I cannot really use StandardSetController(10,000 records limit) or SOQL Offset (2000 records limit).

Is there any other way I can get the records onto the UI without hitting limits?

  • Remove unnecessary fields from the query ,that should bring the size little less. Sep 3, 2014 at 5:34

1 Answer 1


Its not ideal/recommended to load all data and send it to browser but I know you will have your valid business requirement.

So here is how i would have achieved it.

Split your request into multiple requests. So basically you fetch first 10k records and then next 10k and so on till you get all records.

Once you get all the records in batches of 10 K merge the all JSON responses and crate one JSON of all records then proceed further with your data table.

  • Thnx for the quick response. We were lucky enough that our object had an autonumber field, so we could use this strategy to fetch the records in multiple batches without having to use SOQL offset Sep 4, 2014 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .