This blog will guide a user on how to pass parameters a run-time on Report and invoke the report through custom link or custom button.
Dynamic reports let users analyse the data for particular records whose parameters have been passed through URL.
Read More: Salesforce – Sage ERP Integration
For e.g.: Let’s consider a scenario where, user have a report that displays the summarized data for all the Accounts (Customers) and its respective Orders (Sales Orders). Now, when running the report user only wishes to see the report of a particular Account and associated Orders. To achieve this we have to pass the particular Id of the Account as parameter to the report.
Guidelines for adding parameter/filter on the report:
- Go to your report and edit it.
- Select the desired “API name” of the field in which you want to pass the value of parameter.
- Select the operator and keep the value box blank/empty, For Ex: the filter of AccountID as shown in below image.
Now let’s go to the “Object Setting” of the respective object where you want to display the report (in our case i.e. Account). And let’s create a custom link button and add parameter to it with the help of below steps:
- Go to the “Setup”, and Open the Object Manager tab.
- In the Quick find box search for Account object.
- Under the options, select the “Buttons, Links and Actions” module.
- Create an Action or Custom button whichever is preferable according to you.
- Type in your URL in the URL box as shown in the figure (Refer: Report URL), and copy the “lightning/r/Report/<YourReportID>/view” and paste the Report ID of your report instead of YourReportID.
- To identify YourReportID, go to the reports tab and open your report, once you have opened it, copy the text as shown in the below image.
- Append the parameter ?fv0=<Filter Value> to the end of the report’s URL (Refer: Report URL).
- fv0 —fv stands for “filter value,” and is the name of the parameter. The 0 is the numerical order in which the filter appears in the report. (The first filter is 0, the second filter is 1, the third is 2, and so forth.)
- & — denotes a new parameter in the URL. If no other parameters are present in the URL, then substitute “?” in place of “&”.
- Save the button and add the button/link on the Layout.
Now your report will dynamically run as per the parameter passed through the URL. We hope you may find this Blog resourceful and helpful. If you still have concerns and need more help, please contact us at email@example.com
For more information, you can refer the below link: Filter Reports via URL Parameters in Lightning Experience
Greytrix – a globally recognized and one of the oldest Sage Development Partner, as 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. 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 to 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.
For more information, please contact us at firstname.lastname@example.org. We will be glad to assist you.