Iframe Component for Screen Flow

iFrame Component for Screen Flow

An iframe is an HTML element that lets you display one web page inside another. In other words, it gives you a way to embed external web content directly within the current page, without sending the user somewhere else. There are many cases where this can be useful in Salesforce. You might want to display external content inside a Screen Flow, or show it directly on a Lightning page as part of a business process.

Salesforce does not provide a standard component for this use case. There are a few workarounds depending on what you are trying to achieve, but they tend to fall short when you need more flexibility. Especially if you want to build the iframe URL dynamically or if you need to pass parameters from record.

In this post, you will find a simple Screen Flow component that lets you display an iframe in Salesforce.

How to Use the Component

1- Install the package using the installation links below.

2- Create a screen flow and add the "iFrame Component" screen component to a flow screen.

iFrame Component for Screen Flow

3- Configure the component according to your needs.

  • Iframe URL: The URL to display inside the iframe.
  • Height: The height of the iframe. The default value is 600px. You can use either pixels or a percentage.
  • Show Border: Controls whether the iframe border is displayed.
  • Width: The width of the iframe. The default value is 100%. You can use either pixels or a percentage.
iFrame Component Configuration

Before using the component, make sure to add the iframe URL domain to Trusted URLs in Salesforce. Lightning pages allow external frame content only when the domain is explicitly trusted, and the URL must use HTTPS. Also keep in mind that even after adding the domain, some websites still can't be displayed if they block iframe embedding through their own browser security headers.

Here is an example that displays the Instagram profile of the account.

Iframe Example

Installation Links

Use this link to install in production or developer edition environments.

Use this link to install in sandbox environments.

Be the first to comment

Leave a Reply

Your email address will not be published.


*