Loading

Add Custom Link to Lightning App Record Page

Publish Date: Jun 2, 2026
Description

This article explains why Classic Custom Links are not directly available in Lightning App Builder record pages and outlines three supported workarounds to give users filtered report access from an Account record page.

Resolution

Classic Custom Links are not surfaced as standalone components in the Lightning App Builder. When using field section layouts instead of the full Record Detail component, custom links cannot be directly placed on the page. However, there are three available workarounds 

Option 1: Report Chart Component
Option 2: Custom button with Merge Field URL
Option 3: Formula (Text) Field with HYPERLINK()

Use the steps below to implement your preferred option

Option 1: Report Chart Component 

  • The Report Chart Component is a native Lightning component that can be added directly in Lightning App Builder. It automatically filters Chart data by the current record's Account ID. Users can click the View Report link inside the Chart to open the full filtered Report

Step 1: Ensure Your Report has a Chart

  • Open the Report you want to display. If it does not already have a Chart, click Edit, then add a Chart using the Add Chart button. Save the Report. See example Report below with Chart 

Step 2: Open Lightning App Builder

  • Navigate to Setup > User Interface > Lightning App Builder. Open the Account Record Page you want to modify, or create a new one

Step 3: Add the Report Chart component

  • In the left-hand component panel, search for Report Chart. Drag and drop it onto your page canvas in the desired location. Select Relevant Report and select Filter in Filter by Section of Configuration

Step 4: Save and Activate

  • Click Save, then Activate the page. Users viewing an Account record will now see the Report Chart, pre-filtered to that Account. you can click View Report inside the Chart to open the full Report

Note: The Report must be of a type that supports Charts such as Summary or Matrix. The Chart auto-filters by Account ID when viewed from an Account record page

Option 2: Custom button with Merge Field URL

  • A Custom button added to the Account page layout provides a clickable link that works in both View and Edit mode. This is the most flexible option and does not require a Chart-enabled Report

Step 1: Ensure Your Report has the required Filter

  • See example Report below, It's filtered using Account ID

Step 2: Create the Custom button

  • Navigate to Setup > Object Manager > Account > Buttons, Links, and Actions. Click New Button or Link and configure as follows:
  • Label: For example, View Active Contacts
  • Display Type: Detail Page Button
  • Behavior: Display in existing window without sidebar
  • Content Source: URL
  • In the URL field, enter the Report URL with the Account ID merge field appended, for example: /lightning/r/Report/<YOUR_Report_ID>/view?fv0={!Account.Id}
  • Replace <YOUR_Report_ID> with the 15 or 18-character Salesforce Report ID. Click Save

 

Step 3: Add the button to the Page Layout

  • Go to Setup > Object Manager > Account > Page Layouts. Open the relevant layout. In the layout editor, scroll to the Custom Buttons section and drag your New button into it. Click Save

Step 4: Verify on the Record Page

  • The button will now appear in the Highlights Panel button bar on Account record pages. Users can click it to open the filtered Report. See screenshot below with View Active Contacts button 

Option 3: Formula (Text) Field with HYPERLINK()

  • A Formula field using the HYPERLINK() function renders a clickable link inside a field section. This is the simplest to set up but only works in View mode the link is not visible when the record is in Edit mode

Step 1: Ensure Your Report has the required Filter

  • See example Report below, it's filtered using Account ID 

Step 2: Create the Formula Field

  • Go to Setup > Object Manager > Account > Fields & Relationships > New. Select Formula as the data type, then Text as the Formula return type. Enter a field Label for example Active Contacts Report

Step 3: Enter the Formula

  • In the Formula editor, enter: HYPERLINK("/lightning/r/Report/<YOUR_Report_ID>/view?fv0=" & Id, "View Active Contacts")
  • Replace <YOUR_Report_ID> with your Report's ID. Click Next, set field-level security as appropriate and select the relevant page layout, then Save

 

Step 4: Verify the field on page

  • You will see field on page and when you click on link, it should take you to filtered Report 

__________________________________________________________________________________

Written by: Sushil Kumar | Forum Ambassador
Sushil Kumar is a Salesforce Technical Architect at UKG. At the time of writing, Sushil has worked in the Salesforce ecosystem for 15 Years, holds 14 Salesforce Credentials including Salesforce Application and System Architect. Sushil serves as a Trailblazer Community Forum Ambassador, and regularly participates in the community.

Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials).  Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third  Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality,  usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions. 

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

Knowledge Article Number

005336072

 
Loading
Salesforce Help | Article