UPDATE:
Thanks Evan for your comments!!
In more recent versions of Flow, you can simply have your URL point to /{!RecordId} and Salesforce will correctly navigate to the record. Obviously, RecordId variable in the flow should hold the Id of the record. I did a quick check on this in my Dev edition org and it worked.
Here is how you can do it in the new flow builder:
Create a screen element with the Display text as Link(or whatever you name the text) and give the hyperlink as /{!RecId} where RecId is the flow variable which holds the Id of the created record or the Id of the record to be navigated to, after the user clicks on the Display text(Link). Screenshot is given below for your reference:
How to achieve this in Old Flow Builder:
For example, there is a flow which gets inputs from user and creates a RateCard(Custom object) record, if it doesn’t exist in the system. Once created, it should show the URL(clickable) of the record created.
This is possible by editing the screen(which is the last step in the flow) and the Display text field there is a little button which shows T(marked in yellow colour in the screenshot below) with what looks like a selection box around it. Type the text you want (View the RateCard record here). Highlight it, and in one of the fields that showed up you can put in the url,something like https://cs5.salesforce.com/{!RateCardIdcreated}
P.S: RateCardIdcreated holds the Id of the RateCard record created.
Please let me know your comments.
I went to 10 different blog sites and the one on stack exchange and no one else’s answer is as clear as yours on how to create a hyperlink within flow. I was able to complete this portion of my process in minutes. Thank you for sharing your knowledge.
LikeLiked by 1 person
Thanks Trinh Harrison! Glad to hear about it!
LikeLike
I echo Trinh’s thoughts. Do you know if there’s a way to force it to open the link in the same window? Thanks!
LikeLike
Hi Megan,
Thanks!
Yes, you can open the link in the same window, but you need to use ahref HTML tag for it.
I tried in my developer edition and it worked. Unfortunately, I am unable to post the screenshots in my response here hence I shared them in Dropbox https://www.dropbox.com/sh/rmu0f8ztegouhfi/AAA_uTM0ehxDM9X5Elv1QPwfa?dl=0 for your reference.
Let me know for any clarification.
LikeLike
Thank you so much! That worked!
LikeLike
Welcome! Glad to know that it worked for you!
LikeLike
Thanks! This worked great.
LikeLike
Great, glad to hear that it worked for you!!
LikeLike
In more recent versions of Flow (perhaps it always worked?) You can simply have your URL point to /{!RecordId} and Salesforce will correctly navigate to the record. This way you don’t need to mess with your instance domain in the URL.
LikeLike
Ok, thanks Evan for letting us know!!
LikeLike
Hey Mani,
I don’t see the little “T” icon in the newer Flow builder. Did you get a chance to do this in the latest flow builder? Also what other options do we have to achieve hyperlink function in new flow builder?
LikeLike
Really, sorry for my late response Karthik..hope you would have already got the answer..any case, I will update the post with Evan’s answer which is given above..thx!!
LikeLike
Hi Karthik,
I have updated the post with Evan’s answer and with the screenshot from my Dev edition as well..hope it helps!!
LikeLike
Is there any possibility to open the link in same tab ? right now with /{!recordId} is opening in new tab
LikeLike
Hi,
It looks like if we use HYPERLINK function, we can open the URL in the same tab by using the “_top” parameter).. Details are in https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000A92moSAB
Frankly speaking, I have not tried myself the above solution but I think it should work. Please try and let us know the result. Thanks!!
LikeLike
Hi Mani,
Thanks for responding!
I tried below one it didn’t helped me
1.Created a Hyperlink formula field
HyperLink(“/”&Id,”someIdField” “_top”)
2.on the screen flow — for display text field I linked this HyperLink field using link on display text /{!Object.HyperLinkField}
Please let me know if I am doing it wrong
LikeLike