You need to sign in to do that
Don't have an account?
street
How to retrieve more than 1000 records in single SOQL query?
I have an custom object which has more than 1000 records in it. Able to retrieve only 1000 records above that it is throwing an error... How to retrieve more than 1000 records on a single soql query?
Regards,
VNath.
There is a 50,000 limit on the total number of records retrieved by all SOQL queries in a transaction.
There is also a limit of 100 on the total number of SOQL queries issued.
These limits can be avoided, but it depends on what you are trying to do.
If you can post some code examples it might help.
Some thing like this....
Hi Street ,
it should work.
Regards,
VNath.
You are trying to add to a list that hasn't yet been created.
Try
Then you can add to the list with :
Collection size 1,452 exceeds maximum size of 1,000.
This is the error im getting :(
If you query more than 1000 records, and try to add them all to a single list, you'll get that error. PLOT__c[] o can't exceed 1000 items. I think they removed that in later versions of the API, so you might check your version settings (edit the class and check the versions tab).
Also, save yourself some script statements and use:
Of course, that's actually pretty pointless, since you could just as easily do this:
Then again, you should probably consider your application design; there's virtually no reason at all to load more than a couple of hundred records at once. Make sure you're filtering your queries.