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!

  1. 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
Image showing blank &. unlocked filter on Record Id field.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn
  1. 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.
Image showing the report title & description.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn
  1. 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!

  1. In place of URL, add the url of the report created in the 1st part
Image showing the report URL part to use into the formula editor.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn
  1. 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. 
  2.  [, 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 :

Color coded formula.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn
Your formula in Salesforce:
Image of the hyperlink formula field.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn
  1. Add a description to the field specifying its use.
  2. Add the field to the page layout & make sure Users have access to it
  3. Test!
Image of the field result on the page layout.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn

The Reports opens as a Subtab in the Console… 

Image of the report with the record id in the filter.
  • Facebook
  • Twitter
  • Gmail
  • LinkedIn

… & the Account ID filter gets fed with the recordId.

Hope that does the trick!

Share This