9

I have a (reasonably) Year on Year analysis summary report that I use in Salesforce and I would like to create this report in SOQL or at least create the SOQL equivelant to return the same results, short of building the SOQL statement myself, I want to know is there a way of finding the SOQL behind any particular report in Salesforce?

11

There is no way to obtained this, I doubt even Salesforce actually uses SOQL inside the reporting engine. To get a better developer perspective on the report definition you could use the Force.com IDE tool to download the report (which uses the Metadata API). I've heard of some off platform solutions using this information to parse the report and generate queries SOQL (though its doubtful all report definitions can be supported via SOQL). In the future we will see the advent of the Analytics API (first from REST, then Apex) that will allow an API into the reporting engine!

enter image description here

  • Thanks Andrew, 'looks like I need to get dirty under the hood! I AM looking forward to the REST Analytics API functionality, just to think that a report can be sent back this way is very exciting. If you get a chance, would you mind mentioning some of the off-platform solutions (OSX platform)? Much appreciated. – Bartley Sep 18 '13 at 19:24

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.