A Flow Action That Gets the URL

A Flow Action That Gets the URL

There are numerous scenarios in which you might need to obtain the current URL for various purposes. For example, you may wish to extract parameters from it, pass record id to a flow in the utility bar, or perform an analysis. However, there is no standard way to get the URL.

In this post, you can find a Lightning component that gets the URL. You can call it as a local action from screen flows in order to obtain the URL. Then you can parse the obtained value within the flow and extract any necessary information.

How to Use the Component

1- Install the component using the installation links below.

2- Add a new action to your flow and search for GetURL, this is the name of the component that you installed.

Action to Get the URL

You can use the component's output value in order to obtain the current URL.

Action to Get the URL

While it is currently possible to pass parameters to screen flows, dynamically passing values to screen flows on Lightning pages is not supported. However, you can accomplish this by utilizing this action. For instance, as you can see here, screen element displays the current URL and the parameter that we passed (Name__c).

Pay attention that after getting the output value from this action, you should use formulas to extract the parameters. It doesn't extract the parameters automatically.

Demo of Action

Read this post to see how to use this action in order to pass the record Id to a flow in the utility bar.

Installation Links

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

Use this link to install in sandbox environments.

1 Trackback / Pingback

  1. Passing Record Id to a Flow in the Utility Bar - Salesforce Time

Leave a Reply

Your email address will not be published.


*