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
catchforshivacatchforshiva 

How to retrieve more than 50,000 records using triggs?

sfdcfoxsfdcfox
You can't directly do this. You can call a @future method to process the data, or a batch Apex Code class to process up to 50,000,000 records. Regardless, you definitely cannot break the 50,000 limit rule inside a trigger. This limit is for performance reasons.
catchforshivacatchforshiva

How can do using @future annotation methods? please send me the code.

souvik9086souvik9086

You can achieve that through batch apex. It executed 200 record chunk at a time upto up to 50 million records.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

 

hisalesforcehisalesforce

Use either batch apex or future method.

Batch apex will be helpful than future method as with batch apex you can guarantee when its going to update.But with future method its little bit hard to convince user.But again , its your choice and its good there are not too many choices.