3

I am getting this error when I try to run report in apex like this : Reports.ReportResults reportResults = Reports.ReportManager.runReport(reportId, false);

Because, the report has more than 50,000 rows. Is there any workaround for this?

1
1

As you've indicated, the report you are trying to run has more than 50000 rows. You need to limit the report to less than 50000 rows.

You have a couple of options:

  1. Navigate to the report and add a filter to reduce the rows returned (similar to this question: How to filter Report by row limit in Report API?)
  2. Dynamically add a filter to the report using the reporting api (similar to this Salesforce help doc: https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_filter_reportdata.htm)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.