Skip to main content

We would like to create a javascript or SKUID variable that will detect what environment the age is in. The use case is that we have a SKUID portal with embedded tableau iframes, and whenever we refresh the sandbox in order to do some testing, we need to go in and modify all the iframes so they point to the Tableau staging server.

ideally, this variable would detect that it is in a salesforce sandbox and take the value of the Tableau Staging url, ad similarly with production. We would then embed this variable in the iframe so that when it executes it draws from Tableau Staging instead of Prod.

The Global Merge Variable:

$Site.CurrentSiteUrl

is probably what you're after.

https://docs.skuid.com/v10.0.0/en/skuid/merge-syntax/global-merge-variables.html

You can use it in a formula field:

 {{$Site.CurrentSiteUrl}}

or in a snippet:

skuid.page.currentSiteUrl;


Reply