Pages

Wednesday, October 12, 2016

How to use Salesforce Analytics REST API for troubleshooting?

Use case: there is a report created with the same fields name, how to check if the field is come for which object easily? If we edit the report, it will not tell us the existing fields are come from which object.



Solution:

A. Using Workbench to call Analytics REST API
Documentation about this API - Salesforce Reports and Dashboards REST API.

1. Login to Workbench, select  utilities | REST Explorer

2. Execute this service /services/data/v37.0/analytics/reports/00O3B000000FiSd
change 00O3B000000FiSd to your Report Id.


3. Click Show Raw Response link.

4. Scroll down and look for "reportMetadata".


From here, we can see the 1st Created By come from Account, while 2nd Created By come from Contact.


B. Extract Report Metadata 
Use Force.com IDE or Mavensmate to open particular report metadata. Same as above, 1st Created By come from Account, while 2nd Created By come from Contact.




Reference: Salesforce Reports and Dashboards REST API 




No comments:

Post a Comment