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.
A Visualforce page cannot hold more than 1000 records. But, @readOnly annotation increases this limit to 10,000.
Only WebService, RemoteAction, or Schedulable.execute() methods can be marked read-only.
Using Apex, the Total number of records that can be retrieved by SOQL queries is 50,000. It is used to increase the SOQL limit from 50k to million.
For more information, check the below link
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_ReadOnly.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_ReadOnly.htm
" The @ReadOnly annotation allows you to perform unrestricted queries against the Force.com database " .
ReplyDeleteWhat exactly "By unrestricted queries" in above statement means. I can only get 1 million records in @readOnly,@RemoteAction method. Also is there any record limit while querying using rest api.
Using Apex, the Total number of records retrieved by SOQL queries is 50,000. For REST API, check https://help.salesforce.com/articleView?id=000332074&type=1&mode=1
DeleteHow to make apex:component as Readonly , i have a apex component used as a email template and when the list is having more than 1000 record i am getting a error
ReplyDeleteI don't think that is possible.
DeleteIs there any way to have this sorted??
DeleteI don' think so. You can vote for this idea.
Deletehttps://trailblazer.salesforce.com/ideaView?id=08730000000ij3fAAA