function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CRM_MikeCRM_Mike 

Connector to get URL's of reports

Is there any way the Excel Connector (or any other method) can extract the URL's (and Report Names) of Production reports?  I would like to create a spreadsheet that replicates the functionality of the Reports tab in SalesForce, i.e.: a list of reports, by name, with their URL's so that I can run them any time I choose.

 

Thanks in advance,

 

Mike

SForceBeWithYouSForceBeWithYou

Mike,

 

Unfortunately, the SForce Office Toolkit (which salesforce.com builds and the Excel Connector VBA project references and relies on) only accesses the Web Services SOAP API.  The reports and dashboards are only accessible via the Metadata API, so anything like reports, dashboards, workflow rules, etc. won't be visible at all in the Excel Connector, even if you knew how to change the VBA code for it.

 

You can query the Folder table from the Excel Connector, which will include Dashboard and Report folders (as well as Email template at least).

 

You could go to the Developer Console (formerly the System Log) and run this Apex code:

Report[] allReports = [SELECT Id, Name, OwnerId FROM Report];
for(Report r : allReports) {
    System.debug(r);
}

 You could then view the text file of the raw debug log and delete all lines that don't have USER_DEBUG, do a couple replaces "unecessary leading text" with empty strings, and you'll have a list of report IDs and names that you can use to create links to the report on the name.  Here's a VBA macro I use to link a text description of a record using the ID in the cell on the left:

Global Const SERVER_PREFIX As String = "na8"

Sub insertSFlinkWithIDtoLeft()
    Dim cl As Range
    For Each cl In Selection
        ActiveSheet.hyperlinks.Add cl, "https://" & SERVER_PREFIX & ".salesforce.com/" & cl.Offset(0, -1).Value
    Next cl
End Sub

 

Cheers,

 

Nathan