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
Vimarsh SaxenaVimarsh Saxena 

How to add retURL parameter to a flow URL

I am a newbie to Salesforce and just started to work with Flows. My flow is creating a record and I want to navigate to the new created record when the flow finishes. I read this can be done by adding a retURL parameter here but I can't edit the flow URL to add the parameter. Please help
Syed Insha Jawaid 2Syed Insha Jawaid 2
Hi Vimarsh

You dont have to change the flow URL but have to add the retURL as parameter when you call you flow.
To better understand it refer to this link :

Vimarsh SaxenaVimarsh Saxena
Thanks Syed!

This was helpful and I have created a custom button URL. The only issue I have now is I can't add new record created by my flow to the retURL parameter.

Once my flow is launched from one of the objects (Object1), it creates a new record for another object (Object2). Object1 has a lookup field (let's call this Field12) which looks up to the new created record for Object2.

Here is how my button URL looks like: 


and it's not working. This retURL navigates to 'https://mydomain/lightning/r/Object2//view' which results in Page Not Found.

I will appreciate if you could suggest something.

Thank You!
Syed Insha Jawaid 2Syed Insha Jawaid 2
Hi Vimarsh

There is a possibilty that til your flow ends the field has not yet been updated because of which the URL has no record Id.

Mohammad Asif 5Mohammad Asif 5
it should be
Sai Sasidhar BhagavathulaSai Sasidhar Bhagavathula
Hi Team,

retURL is working but it's taking me to original record, but not the cloned record...could you pls help me out how to redirect to newly created record