You need to sign in to do that
Don't have an account?

Handling more than 10,000 records
Hi,
I have one SOQL which will retrieve nearly 50k records. Can anyone please tell me how to handle this scenario.
As SOQL is able to retrieve at most 10,000 records, somehow I need to pass the start index to SOQL to retrieve set of next 10,000 recs..etc.
Is it possible at all? How will Batch apex help in this?
Thanks ain advance,
Suvra
With Batch Apex, your SOQL will be able to retrieve up to 50,000,000 records and process them. So you wouldn't have to worry about indexes at all. However, you're indeed limited to 10,000 recods/SOQL call if you have to use Visualforce or a regular Apex class/trigger.
If you haven't already done so, take a look at the docs: http://www.salesforce.com/us/developer/docs/apexcode/index.htm
Hello All,
Thanks a lot fo your reply..this link is quite helpful. will get back to you in case further clarifications are required.
Thanks,
Suvra
Hi All,
One more doubt regarding batch apex execution.
Is it possible to retain any state across different executions of a single batch??
e.g, I have one variable called index, which is initialised to 0. Now, within execution() method of batch apex class, i'm updating the variable value. I want the next execution() method to take the updated value of index while processing. But its again taking the value "0", as it was initialised.
any clue on this??
Thanks and Regards,
Suvra