1

Is it possible to use the records a standard Salesforce report would generate in a Visualforce page or class? Is see that there is an api to query for report metadata, but is there a way to also get the records that is would generate as well?

We have a project that requires us to be able to make complex queries for a subset of records and then create reports detailing the field change history. I know that SF is very limited in how it can report field history so I'd like to at least be able to query for the records on separate object types and send those records to a custom page that will query the history for each of those records and process them for custom reporting.

  • Are you looking to retrieve data contained in reports or create the reports themselves? – Adrian Larson Feb 19 '16 at 20:04
  • 1
    Specifically I want to retrieve the actually record data in the reports themselves. Really just the record ID's so that I could manually query for each of their field histories. I know SOQL and the SOAP API already lets you use dynamic string queries, but I'd rather not have to recreate the wheel that SF has already made with their report builder and just build on top of it a custom reporting engine for field history. – Andrew Bettke Feb 19 '16 at 20:06
  • See: Salesforce Reports and Dashboards REST API Developer Guide (a.k.a. Analytics API). This question is probably to broad to receive a good answer. – Adrian Larson Feb 19 '16 at 20:08
0

See: Salesforce Reports and Dashboards REST API Developer Guide (a.k.a. Analytics API) if you want to use Report data in Apex. The subject is rather exhaustive so going into detail here is probably not the place unless you have more specific questions.

|improve this answer|||||
  • 1
    Instance Results for Execute Async is exactly what I was looking for, thanks! – Andrew Bettke Feb 19 '16 at 20:20
0

I think your best shot are Report Snapshots.

|improve this answer|||||

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.