1

I have embedded a flow in a Visualforce page using the below code. I want to run the Visual Flow and Finish it on a specific page within Salesforce.

When I click Preview on the Visualforce home page, the Flow works correctly - It lands on the Salesforce homepage. When I Run the Visual Flow normally by clicking the Run button from the Flow page, on Finishing, the Flow does not land on the homepage, it loops back to the firs page of the Flow.

Can someone help me with this?

Thank you, Ciaran

<apex:page >
    <flow:interview name="Test_Flow" finishLocation="{!URLFOR('/home/home.jsp')}"/>
</apex:page>
1

The finishLocation is only available from the VF Page. When you use the "Run" from inside the flow environment, the Flow will restart after being finished.

2
  • Thank you for your reply. Is there anyway to Run the Flow and have it land on any other page rather than restarting over again?
    – Clehan1
    Mar 24 '14 at 10:49
  • ONly by running it from the VF page, as you have defined. Running it from in the flow section of setup should be primarily used for testing purposes. One other note, from the help: help.salesforce.com/HTViewHelpDoc?id=vpm_admin_onfinish.htm
    – JimRae
    Mar 24 '14 at 12:01
1

It's because the finishLocation URL is being set in the Visualforce page when it launches the flow. The run button doesn't load this VF page, it just launches flow and without that finishLocation URL, it just loops back on itself when it completes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.