I am trying to get the results of a Salesforce report programmatically.
This blog is often mentioned about how to clear results from a web page, but the method is not supported: http://sfdc-heretic.warped-minds.com/2006/04/10/progmatic-access-to-salesforcecom-reports/ .
I can get the list of reports via REST api:
require 'restforce' restforce_client = Restforce.new( :refresh_token => <refresh token>, :client_id => <client id>, :client_secret => <client secret> ) reports = restforce.query("SELECT Id,DeveloperName FROM Report") reports.last.DeveloperName => "Rob_Test_Report"
I also tried searching through the ReportAldor API SOAP API metadata object:
require 'metaforce' metaforce = Metaforce.new( :username => <username>, :password => <password>, :security_token => <security token> ) report_folders = metaforce.list_metadata('ReportFolder') report_folders.last.full_name => "RobTestReportFolder"
I see a folder. I havenβt received the content yet, but even when it seems to me that Iβm just getting metadata around the report itself (i.e. Filter Criteria), not the report results. The api metadata is discussed here: https://success.salesforce.com/questiondetail?qId=a1X30000000IQ8pEAG . Is it correct?
I saw this similar question a couple of years ago, but I did not know if it was correct or something had changed in the API: How to access reports programmatically in SalesForce using Apex
Can I export or pull report results through a supported Salesforce API?
source share