You need to sign in to do that
Don't have an account?
Mitesh Saparia 8
how can I solve this ? System.LimitException: Too many query rows: 50001
System.LimitException: Too many query rows: 50001
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I hope you are doing well but make sure salesforce allow you to Total number of records retrieved by SOQL queries only 50,000
You can check Apex Governor Limits.
You can follow this link for know about Governor Limits:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
I hope you are doing well but make sure salesforce allow you to Total number of records retrieved by SOQL queries only 50,000
You can check Apex Governor Limits.
You can follow this link for know about Governor Limits:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
This exception is coming because you cross the governor limits.
Salesforce has its limits of accessing data and performing DML operations and all. you have to take care of governor limits.
please go through the given links to know about the governor limits in salesforce and apex.
-https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm
-https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
if you want to do operations or manipulate as much of records you have to use batch apex.
for batch apex please go through the given links.
-https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
-https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha