Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Custom Links entry
How-to guide

How to build or modernize Custom Links

The pattern: for new navigation in 2026, default to Quick Actions or Custom Buttons. Use Custom Links when the org culture or existing infrastructure makes them the right choice. For legacy Custom Links, maintain working ones and replace JavaScript-based ones during Lightning migration.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 18, 2026

The pattern: for new navigation in 2026, default to Quick Actions or Custom Buttons. Use Custom Links when the org culture or existing infrastructure makes them the right choice. For legacy Custom Links, maintain working ones and replace JavaScript-based ones during Lightning migration.

  1. Decide whether Custom Link is the right construct

    For inline record actions, Quick Action. For Lightning-native button experiences, Custom Button. For text-link navigation or org-cultural consistency with existing Custom Links, Custom Link.

  2. Open Buttons, Links, and Actions in Object Manager

    Object Manager, pick the object, Buttons, Links, and Actions, New Custom Link.

  3. Write the URL with merge fields for dynamic context

    Use the merge field picker to insert record data. Test the URL with a real record to confirm the merge fields resolve correctly.

  4. Pick the display type and behavior

    Link, Button, or sidebar. Same window, new window, or popup. Most Custom Links default to Link + new window.

  5. Add the Custom Link to the page layout or Lightning Record Page

    The Link exists but is invisible until placed. Add via Page Layout (Classic-style placement) or Lightning App Builder (Lightning placement).

  6. Test as an end user

    Click the link on a real record. Confirm the URL resolves correctly, the destination works, the behavior matches expectation.

  7. Audit existing Custom Links during Lightning migration

    For each Custom Link, decide: keep, modernize to Quick Action, retire. Document the decision and execute through your normal change pipeline.

Key options
URL with merge fieldsremember

Dynamic URL that injects record data via {!Object.Field} merge syntax.

Display typeremember

Link, Button, or sidebar component. Drives visual placement.

Behaviorremember

Open in same window, new window, or popup.

Page layout placementremember

Custom Link is invisible until added to a page layout or Lightning Record Page.

Modernization candidateremember

Whether the Custom Link should be replaced by Quick Action, LWC, or Custom Button.

Gotchas
  • JavaScript Custom Buttons do not work in Lightning. Migration requires rewriting as LWC or Quick Action.
  • Custom Links are invisible until added to a layout. Building the Link without placing it is a common omission.
  • Merge fields that reference non-existent fields produce empty URL segments. Test against a real record before declaring done.
  • Open in popup window is rarely the right modern UX choice. New window preserves the Salesforce session; popup feels dated.
  • Stale Custom Links accumulate. The cleanup is rarely scheduled and the result is record pages with sections of links nobody clicks.

See the full Custom Links entry

Custom Links includes the definition, worked example, deep dive, related terms, and a quiz.