Hi everyone,
How to get name and link of environment (Test/Dev/Pro) that using
Thank you.
Discussion posts and replies are publicly visible
What is the environment do you want? you can get community edition environment by following the belove steps. go to learn tab and then my learning journey and click on get my site .
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
A common method is to deploy an environment-specific constant to each environment and have the details (e.g. environment abbreviation, environment link) altered per import using the import customization file on each environment.
This way you have full control over the value and it's use.
thanks you.
I find another solution that
a!urlForTask(taskIds: -1, returnTaskPathOnly: false)
I try to use a simple way that using function a!urlForTask
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]