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
Sowjanya VaddiSowjanya Vaddi 

Too many query rows: 50001 in lightning Form

Too many query rows: 50001-- I placed LIMIT for SOQL query ,still getting this error,please suggest me solution to resolve
Best Answer chosen by Sowjanya Vaddi
AbhishekAbhishek (Salesforce Developers) 
You are seeing this error due to the cap on the number of updates that Salesforce will allow on a DML. The max is 50K. You can reach out to Salesforce to see if they can make an exception for your org to increase your query rows governor limit to 100,000 rows.


For further reference, you can check these developer discussions,

https://salesforce.stackexchange.com/questions/28228/system-limitexception-too-many-query-rows-50001

https://support.picnet.net/hc/en-us/articles/115000030432-Why-am-I-seeing-the-error-sbm-Too-many-query-rows-50001-#:~:text=You%20are%20seeing%20this%20error,governor%20limit%20to%20100%2C000%20rows.


Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.

All Answers

AbhishekAbhishek (Salesforce Developers) 
You are seeing this error due to the cap on the number of updates that Salesforce will allow on a DML. The max is 50K. You can reach out to Salesforce to see if they can make an exception for your org to increase your query rows governor limit to 100,000 rows.


For further reference, you can check these developer discussions,

https://salesforce.stackexchange.com/questions/28228/system-limitexception-too-many-query-rows-50001

https://support.picnet.net/hc/en-us/articles/115000030432-Why-am-I-seeing-the-error-sbm-Too-many-query-rows-50001-#:~:text=You%20are%20seeing%20this%20error,governor%20limit%20to%20100%2C000%20rows.


Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
This was selected as the best answer
Sowjanya VaddiSowjanya Vaddi

Hi Abhishek,

I raised the case to salesforce to increase the LIMITS.

 

Sowjanya VaddiSowjanya Vaddi
Raised the case,salesforce support team said that they cannot increase the limit


I would like to inform you that this is HARD Limit at the backend and can not be increased at all.