function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cARL scARL s 

Returning a large number of records

My development lead wants to return an large number of rows of data (no more than 1 million)  from a Salesforce based custom object and then use jquery to present them to users in a single page.  What is the best way to accomplish this?   My development lead is not willing to accept any other options.

Cory CowgillCory Cowgill

Aside from the fact that processing 1 million rows of data in JQuery is madness, there are a few potential options.

 

1. Use the @ReadOnly annotation in Summer 11 release. This is availalbe in Web Service calls. Take a look at the documenation on it.

 

ReadOnly Annotation—Generally Available
The @ReadOnly annotation was previously released as a pilot in Spring '11 and is now generally available in Winter '12.
The @ReadOnly annotation allows you to perform unrestricted queries against the Force.com database. All other limits still
apply. It's important to note that this annotation, while removing the limit of the number of returned rows for a request, blocks
you from performing the following operations within the request: DML operations, calls to System.schedule, calls to
methods annotated with @future, and sending emails.
The @ReadOnly annotation is only available for Web services and the Schedulable interface. To use the @ReadOnly
annotation, the top level request must be in the schedule execution or the Web service invocation. For example, if a Visualforce
page calls a Web service that contains the @ReadOnly annotation, the request fails because Visualforce is the top level request,
not the Web service.

 

https://na4.salesforce.com/help/doc/en/salesforce_winter12_release_notes.pdf