TIPS & TRICKS
Use case:
- A company needs to see/export a report filtering data specifically for an Account or an Opportunity: for instance to send it to that Client on a frequent basis.
- A company needs to quickly see more fields of the related list than the 10 max available at once
The Trick!
- Create a report
- Add all fields, grouping & filters as you need
- Add a filter on the Account ID such as AccountID = “” . This filter needs to stay unlocked
- Additional tip: if the report contains more than one filter, keep that one at the top so that it always matches the “fv0” from the formula we will see below on point 3
- Save the Report into a Public folder. Make sure the Description precises the use of that report into the record details page & that it contains this unlocked filter that must remain untouched.
- Create the new formula Field
- Navigate to the Object Manager & then to Account, Fields & Relationship.
- Create a Formula field & name it clearly, such as “{Report Name} Link”.
- Select “Text” for the formula return Type.
- In the formula editor, add the HYPERLINK function so it returns: “HYPERLINK(url, friendly_name [, target])”
Let’s decompose that one now!
- In place of URL, add the url of the report created in the 1st part
- Friendly_name will be replaced by how the link should show on the details page. It can be dynamic such as {AccountName} & “’s Opportunities Won”. The merge field needs to be out of the quotation mark, & remember to add a space after the first quotation mark so it after the merge field in the front end.
- [, target] is to specify how the link should open:
- _self: the report will open in the same page, or inside the same tab when using the Console
- _blank: the report will open in a new tab
As a result, you get :
- Add a description to the field specifying its use.
- Add the field to the page layout & make sure Users have access to it
- Test!
The Reports opens as a Subtab in the Console…
… & the Account ID filter gets fed with the recordId.
Hope that does the trick!