You need to sign in to do that
Don't have an account?
Aakanksha Singh 11
How to retrieve more than 50k/1 million records through apex class in salesforce
Hello Everyone,
I want to know the possible ways through which we can fetch more than 50k/1million records through apex class in salesforce.
Please respond.
Thanks in advance.
Rregards
Aakanksha Singh
I want to know the possible ways through which we can fetch more than 50k/1million records through apex class in salesforce.
Please respond.
Thanks in advance.
Rregards
Aakanksha Singh
All Answers
You cannot retrieve more than 50,000 records your SOQL calls in a single context.Batch Apex is the only answer.
However using @readonly annotation can allow you to query up to 1 Million SOQL Rows but those records will be read only and you will not be
able to perform any DML operation on those records.You can refer the below link for batch apex.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
Thanks for replying!!
I retrived data through batch apex, bt neither I'm able to access its variable in another class nor assigning the value to the static variable of another class. You can refer to the following link: https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I9BRQA0
Further I'm also trying to work through REST API, if you have any idea regarding these, please reply soon'
Thank You
Aakanksha Singh