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
Brian Oconnell 23Brian Oconnell 23 

Flow in VF page - set return url to id of Flow variable

I have a simple Visual Flow embedded in a simple Visualforce page that creates a record in a custom object.  When the flow ends, I would like to redirect to the detail page of the record that was just created (using a Flow variable).  How can I reference a flow variable in the <flow>'s returnurl parameter?
User-added image
Jyosi jyosiJyosi jyosi
Hello Brian

Can you try this replace the case with object custom object Name
<apex:page standardController="Case" tabStyle="Case">

 <flow:interview name="Final_Survey_1_1" finishLocation="{!URLFOR('/' + case.Id)}">
    <apex:param name="CaseId" value="{!Case.Id}"></apex:param>

Brian Oconnell 23Brian Oconnell 23
Hi Jyosi,

That syntax appears to be for sending a variable to the Flow, not retrieving a variable from the Flow.