This blog signifies how a user can find the API metadata for a particular report. Before going through this blog make sure you have a keen understanding of reports, workbench and can understand sample apex code.
User will generally use this method to find the API name for the field attribute in <analytics:reportChart>. Using the Analytics API user can access Report Metadata.
Kindly follow the below steps to get the metadata for the report:
- Open Salesforce workbench (https://workbench.developerforce.com/)
- Select your Salesforce (Sandbox or Production) Environment and API version to login to your Salesforce credentials.
- In workbench under the “Utilities” tab click on “REST Explorer”
- Copy the URL: “/services/data/v29.0/analytics/reports/YourReportID/describe” and paste it in the Execute box.
Note: Paste the Report ID of your Report and replace it with YourReportID from the URL
- To identify YourReportID, go to the reports tab. Open your report, and copy the text as shown in the below image
- Execute the URL and you will see responses for the particular Report and click on the ReportMetadata.
- In the expanded view of the module, search for ReportFilters. And you will see the number of parameters that have been set for the report.
- Now we can use pass the filter value of the report dynamically through Apex class as shown in the below apexcode:
<analytics:reportChart reportId="00O3D000000bsojUAA" filter="[{column:'FK_ACC_ID', operator:'equals', value:'DynamicallyAssignedValue'}]" size="medium" cacheResults="false"/>
Where,
Column: The API name of the field that you want to filter on.
Operator: The API name of the condition you want to filter a field by, for example to filter by “not equal to”, we can use API name “notEqual”
Value: The filter criteria.
For more information, you can refer the below link: Use Metadata API to retrieve and deploy using Workbench
We hope you may find this Blog resourceful and helpful. If you still have concerns or need more help, please contact us on salesforce@greytrix.com
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.
Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support business partners and end users.
Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.
The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.
For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.
Related Posts