We have a few external URL's stored on Account records that are populated by an internal tool. These are absolute URLS (https'n'all) to the same records in an internal system. How do I make these addressable in Lightning? Do I create a small Lightning Component that opens these URL in a Lightning subtab? Can Lightning even open a seperate browser tab to open these?

1 Answer 1


Whilst your question relates to external URLs, it seems clear that you wish to open new tabs that include the Lightning "chrome", including the Salesforce app navigation bar I presume. That means you need:

  1. A target page that includes a custom component that:
    1. Gets query parameters from the page that direct its behaviour; e.g. the external URL to be shown.
    2. Uses an iframe to show that external URL within its body; this will require the external site to allow this cross-domain frame ancestor scenario.
  2. A custom component you can use in your Account page for each of these URL fields that presents a button that when clicked navigates (in a new tab) to the target page, passing the required query parameter(s), e.g. the external URL from the field.

You'll find some helpful information in this previous Q&A around passing URL parameters using the NavigatorMixin with LWC components.

You'll also want to read about frame ancestors in case this might bite you.

  • Thanks Phil, I've never even looked at NavigatorMixin before. In my opinion this all complicates things a lot since in classic this would have been solved easily with a custom button that referenced the Account field directly.
    – akarnid
    Commented Mar 11, 2021 at 10:03
  • @akarnid this would not have kept the user within the Salesforce Experience though; if you don't need the Salesforce "chrome" (including navigation bar etc.) to be around the target external URL simply open that URL in a new tab. The user is then completely outside the Salesforce Experience but they do see the external page.
    – Phil W
    Commented Mar 11, 2021 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .