function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
goravsethgoravseth 

How to set a relative / internal URL in visual workflow screen

On finish screens, I often include a link to a record in addition to setting finish behavior.  So far I have hard-coded the full URL which requires me to update each screen upon deployment to production / sandbox refresh.

So I am looking for how to set a relative URL in a flow.  

Just using /{!vaRecordId} did not resolve properly.

I know on visualforce pages you can do the API partner user thing to resolve sandbox vs prod.  
({!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)

Is there anything similar that will work in a flow?  I suppose I could set a variable in the flow to the instance, and then I would just need to update that variable when I deploy, but trying to just have a nice clean flow deployment process (dream a little dream...)
Zuinglio Lopes Ribeiro JúniorZuinglio Lopes Ribeiro Júnior
Hello,

There are a relationship between the objects? Can't you create a formula text field using your formula ({!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)?

Regards.

Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
goravsethgoravseth
Thanks!  Flows do not appear to recognize $Api.Partner_Server_URL_140 as a valid field. I get an error saying the field does not exist.  
SalesforceYodaSalesforceYoda
Gorav,
You said that defining the relative URL manually as relative didn't resolve correctly. How did it resolve exactly? Did it not show as a clickable link? Did it add extra characters? Throw an error? How did you attempt to make it a clickable link?
goravsethgoravseth
Was grabbing some screenshots and realized that I had not tried deleting the HTTP that shows up by default and just putting in /{!vaRecordId}

So Http://{!vaRecordId} or Http:///{!vaRecordId} dont work - just takes you to http://a3ff00000004u9taae

But removing the Http and just putting /{!vaRecordId} works perfectly!

Thanks!
SalesforceYodaSalesforceYoda
Awesome, I thought that should have worked!
Thomas Shelby 26Thomas Shelby 26
The process of giving significance to the numerous objects and occurrences in a dream is known as dream interpretation. 
https://revesinterpretation.fr/