|
This approach does work, but when you move your Flow from a lower sandbox environment to higher sandbox environments (or to production), it means you need to recreate your URL in each environment.
And if a production Flow ever goes back down to sandbox (say after a sandbox refresh) the URLs are broken again.
Can we do this dynamically instead?
Yes!
Salesforce has a built in Global Variable that contains a URL to the current environment.
Its meant to be used with API calls, but we can take the global variable, and apply some formula functions to find the current environment URL.
Then we can use that URL anywhere we like.
Let's break it down.
First, this is the global variable that has your environment URL:
|