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
Ted TkTed Tk 

Custom Rest API

Hi,

I want to fetch more than 50000 records and send it as response via rest api. I just want to show the data and no dml operations are performed. Can you suggest me a solution where I can overcome the soql limit exception?
grodigrodi
Hi,
pls have a look at the @ReadOnly annotation ... you can find the doc here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_ReadOnly.htm
 Cheers,
--dirk
Ted TkTed Tk
Hi Grodi,

Thanks for the reply. I understand @ReadOnly annotation can be used. Can you provide me some sample where I can use for Rest API?.