You need to sign in to do that
Don't have an account?
Flow finishLocation equal to originating record
I have successfully embedded my Flow into a new visualforce page, created a custom button to run the component, and everything is working perfectly, except for the finishLocation. The flow is generated from an account, and I want the user to return to the account when the flow has been completed.
After scouring the boards for a few hours and trying differnt potential solutions (including: http://boards.developerforce.com/t5/Visual-Workflow/Flow-finishLocation-equal-to-originating-record/m-p/534037#M912), I can't seem to get this thing to work! The flow is generated from the account, and it is used to create an event and/or a task on the account record.
Here is the code:
<apex:page standardController="Account" tabStyle="Account"> <flow:interview name="NA_AR_Sales_Call_Wizard" finishLocation="{!URLFOR('/{!Account.Id}')}"> <apex:param name="varAccountID" value="{!Account.ID}"/> </flow:interview> </apex:page>
use / +{!Account.Id} not URLFOR()
finishlocation='/{!Account.Id}'
Thanks Jeff. I am getting an Invalid Page Redirection error now:
The page you attempted to access has been blocked due to a redirection to an outside website or an improperly coded link or button. Please contact your salesforce.com Administrator for assistance.
I put my page generation in a page controller method that returns a PageReference, then set the finishlocation="{!finishpage}
My controller method is:
return PageReference('/' + contactId);
Forgive me...novice coder - learning as I go!
You have the page controller in the visualfroce page, or do you have it created as a class?
No problem. This is a learning experience for all of us -- its why these Boards are so active and useful.
Here is my page controller class:
and here is my VF page:
My custom button sends the params to the page, which are collected by the controller and passed to the interview. Note that flowname is not currently used (since it has to be hard-coded in <flow:interview> right now, but I am an optimist that someday I will be able to have 1 VF page to launch any flow.
Hi Jeff:
I'm trying to run the code you posted and am getting this error message.
Error: Compile Error: Invalid constructor name: surveyLauncherController at line 6 column 12
Is there a " surveyLauncherController" that could be posted as well?
Thanks, Michele
Sorry. that is just a typo in my code. Change the constructor method name in the controller I posted to be the same as the controller class name and you'll be all set.