Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

enter image description here

How do I get the SOQL query for this report?

share|improve this question

1 Answer 1

There is no way to get the SOQL automatically generated for you. It is entirely possible that a given report cannot be represented by a single SOQL query.

Here are some ideas.

  1. Analyze the report and determine what a SOQL query or multiple SOQL queries with Apex to process and combine their results would be.

  2. Use the Analytics API to run the report and analyze the results. The Analytics API is available via Apex as well as via REST.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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