+ Start a Discussion

Visual Flow - Exiting a flow

I have a flow, it's launched using a button on the Account form. I passed the ID successfully, the flow works as expected. At the end of the flow process I simply want to return to the Account screen where it started. Seems easy enough but I've exhausted my limited knowledge. 


I'm thinking i will need to implement a process.plugin class but I can't figure out how to redirect the page and termintate the flow. 


An example or hints would be much appreciated..





you are setting the finish location, an attribute the tag <flow:interview name"name flow" finishLocation="......">


I believe Ken92's suggestion only works if the Flow is embedded in a Visualforce page. It would be nice for us button click admins that use buttons and links to call Flows to be able to set the finish location as an URL parameter. Anyone?


Yes, but  in this method you work in the apex classes, and you can setting different finish location that depends by variables into the flow and the redirect in more page. IF you have the flow out the page Where setting the getParameters? By javascript the button?



Jeff BloomerJeff Bloomer

With as long as it has been since you posted this question, you may have found the answer.  If not, here is what I did.


In the URL you use in your button or link to launch the flow, do something similar to this:



txt_AcctID needs to be created as a text variable in your flow.


Then for your apex page you use for the flow:


<apex:page sidebar="false">
    <flow:interview name="FlowName" finishLocation="/{!$CurrentPage.parameters.txt_AcctID}"/>

 Hope this helps!


Thank You Jeff! I'd been searching for this everywhere!