+ Start a Discussion
SFDC New learnerSFDC New learner 

Need help with the issue

Hi All,

We have a created a user and given all the required permissions to that user to run batch job. When we run the job manually it is running successfully, but do the same while scheduling it is failing. throwing the error as "System.LimitException: reports:Too many query rows: 50001
I have given all the permissions to objects, related fields Custom settings.
1. I have given "Manage custom report" permission and "View All custom setting" permission for custom settings. Do we need to give any other permission related to custom setting or metadata or report. Is there anything I am missing while granting permission.
Can anyone help me on this who have experienced the same issue.

Anthony McDougaldAnthony McDougald
Good Afternoon Sirisha,
Hope that your day is off to an amazing start. The error that you're receiving is because you're hitting one of the governor limits of Salesforce. Each job is allowed to query 50,000 records or less. Please check through the code of your batch job, specifically the SOQL or SOSL query, and try to either LIMIT the records returned or use the WHERE clause to lower the amount of records that are returned. Hope this helps and may God bless you abundantly.
Best Regards,
Anthony McDougald
SFDC New learnerSFDC New learner
Thanks Anthony McDougald for the quick response. will check.