You need to sign in to do that
Don't have an account?
hikiran raju
How to retrive more than 50000 records using triggers
Hi all,
can anyone let how we can retrive more than 50000 records using salesforce.
Thanks in advance,
regards,
kiran.
can anyone let how we can retrive more than 50000 records using salesforce.
Thanks in advance,
regards,
kiran.
call batch from trigger
Please invoke a batch class from apex trigger and use Database.QueryLocator.
If you use a QueryLocator object, the governor limit for the total number of records retrieved by SOQL queries is bypassed. For example, a batch Apex job for the Account object can return a QueryLocatorfor all account records (up to 50 million records) in an org. Another example is a sharing recalculation for the Contact object that returns a QueryLocator for all account records in an org.
Please refer to the below link to learn more about batch apex
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
Thanks