Hi everyone,
How to get name and link of environment (Test/Dev/Pro) that using
Thank you.
Discussion posts and replies are publicly visible
Create a expression rule as rule!getBaseUrl()
a!localVariables( local!url: urlforrecord(recordIds: cons!VOF_CUSTOMER_RECORD), /*any record type used in your application*/ left(local!url, search("/suite", local!url) + 6), )
This will return the URL for the environment on which you are working or executing the rule
thanks you.
I find another solution that
a!urlForTask(taskIds: -1, returnTaskPathOnly: false)
I am not sure about your requirement but the link is taking us to the task tempo sections.
I don't like this method very much, since the environment-specific constant exists. However if it's absolutely critical that you use a "dynamic" approach like this, i'd just use "extract" instead of fiddling with left() and search() etc.
The requirement is to get the environment URL. Given the output of a!urlForTasks, I'd say it should be fine and you just need to extract the output, like the following:
extract( "<<" & a!urlForTask(taskIds: -1, returnTaskPathOnly: false), "<<", "/tempo" )[1]