No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Configuring the finishLocation Attribute in a Flow
Embedding a flow in a Visualforce page using the <flow:interview> component gives your Force.com Sites, Customer Portal and partner portal users access to the dynamic applications you've built using Visual Workflow. In addition to the other flow customizations available with Visualforce, you can also shape what happens when a user clicks Finish on the final screen.
The following sections show the ways you can configure the <flow:interview> component's finishLocation attribute.
Setting finishLocation Using the URLFOR Function
You
can use the URLFOR function
to:
- Route users to a relative URL, such as the Salesforce home
page.
- Route users to a specific record or detail page using its ID.
For example, if you wanted to route users to a detail page with an
ID of 001D000000IpE9X:
Setting finishLocation Using the $Page Variable
If you
want to redirect users to another Visualforce page when they click Finish, but you don't
want to use URLFOR, you can
set finishLocation to simply
the name of the destination page.
For more information about $Page, see Global Variables.
Setting finishLocation Using a Controller
You can set finishLocation in a few different ways with a controller. Here's some sample code
for a page:
Here's sample code for the controller.
Note there are three different examples.
- getPageA instantiates a new page reference by passing a string to define the location.
- getPageB returns a string which is treated like a PageReference.
- getPageC returns a string that gets translated into a PageReference.