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
SundayAdminSundayAdmin 

Make a Custom Finish Location for a Flow; Finish at start location.

HI,

 

I would like to find out how I could make a flow end at a custom location, more specifically make it end at the place where it was started/clicked, which is a VF page within a button on a record detail page.

 

Here is the VF page that I've created, I only need it to end at the Contact Id page where it was clicked (the flow already has a variable with the Contact Id called ContactID.

 

All help is much appreciatted!

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>
Best Answer chosen by Admin (Salesforce Developers) 
arnaud c.ax1343arnaud c.ax1343

hi all, i thought i might update this with a response since it has not been answered.

 

Since you mentioned a standardController, that means you can pass the record's ID in the finishlocation value like such:

 

<flow:interview name="Flow_Testing" finishLocation="/{!account.Id}">

 

I did that for my own flows.

 

Cheers,

 

Arnaud

All Answers

jsallen79jsallen79

I'm hoping someone can chime in as I'm looking to do something nearly identical.  I have my flow built out but when finished it goes back to the home tab and instead I want the user to be directed to the account the flow originated from.

SucreemSucreem

I have the situation, only my VF page with embedded flow is launched via a custom button at the Opportunity level.  I want to end my flow back at the opportunity I started the flow from.  I'm using the standard Opportunity controller.  

 

Is there a way to link back to the record of origin?

arnaud c.ax1343arnaud c.ax1343

hi all, i thought i might update this with a response since it has not been answered.

 

Since you mentioned a standardController, that means you can pass the record's ID in the finishlocation value like such:

 

<flow:interview name="Flow_Testing" finishLocation="/{!account.Id}">

 

I did that for my own flows.

 

Cheers,

 

Arnaud

This was selected as the best answer
SundayAdminSundayAdmin

Hi Arnaud,

 

It seems to do the trick! However I tried the same thing 2 months ago and it didn't work work as I had the same idea then :s. Thanks for posting the answer as this will make a lot of flows a lot easier to manage, this is much appreciatted!.

 

Kind Regards,

D.

fifedog15-2fifedog15-2
Just what I needed, even a year later you keep on giving Arnaud, thanks.
JD323JD323
I have the same question, though I need it to work on Salesforce1, as well as on web. Any ideas?
Harrison LauHarrison Lau
Is it possible to redirect to a related record?  That is, a seperate object related to our primary object (standard controller object)