Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Overlay entry
How-to guide

Set up an overlay-style custom button or link

The closest admin equivalent of classic overlay behavior is a custom button or link whose display behavior opens its target in a layered window rather than replacing the page. Here is how to set one up in Setup. Remember that several display behaviors were designed for Salesforce Classic and may behave differently in Lightning Experience, so test in the environment your users actually use.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Jun 16, 2026

The closest admin equivalent of classic overlay behavior is a custom button or link whose display behavior opens its target in a layered window rather than replacing the page. Here is how to set one up in Setup. Remember that several display behaviors were designed for Salesforce Classic and may behave differently in Lightning Experience, so test in the environment your users actually use.

  1. Open the object's Buttons, Links, and Actions

    In Setup, go to the Object Manager, pick the object (for example Case or Account), and open Buttons, Links, and Actions. Click New Button or Link to start a fresh definition.

  2. Choose the display type

    Set the display type to Detail Page Link or Detail Page Button so it appears on the record. The display type decides where the control shows up, while the behavior decides how the target opens.

  3. Set the display behavior

    Pick a behavior such as Display in existing window without sidebar or header. This is the setting that, paired with window properties, gives the layered, overlay-like result instead of a full page replacement.

  4. Define the content and add it to the layout

    Enter the URL or content source for the target, save, then edit the page layout and drag the button or link into the layout so users can see it. Confirm it renders where you expect.

Key options
Display Typeremember

Detail Page Link or Detail Page Button so the control sits on the record's detail page.

Behaviorremember

Where the target opens, such as a new window or the existing window without the sidebar or header.

Window Propertiesremember

Sizing and chrome of the opened window, which combine with Behavior to produce a layered, popup-style result.

Content Sourceremember

URL, OnClick JavaScript (Classic only), or Visualforce page that supplies what the overlay shows.

Gotchas
  • Several display behaviors were built for Salesforce Classic and are ignored or act differently in Lightning Experience, so always test in the user's real interface.
  • OnClick JavaScript buttons do not run in Lightning Experience; rebuild that logic as a quick action, screen flow, or Lightning component.
  • For new custom UI, build a dialog with the LightningModal base component instead of trying to recreate the old Aura overlay library.

See the full Overlay entry

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