• 415montgomery
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

I'm having difficulty setting the finishLocation of a flow. I would like users to return to the originating Account record from which they started the flow from upon clicking the Finish button.


I have an object with a master-detail relationship to Account. In the object's related list on the Account, I have a custom button. When clicked, the custom button loads a Visualforce page with a flow:interview embedded in it. Here is the button's URL structure:



 Here is the Visualforce page without any finishLocation set:


<apex:page standardController="Account">
        <flow:interview name="UWScheduler" />

 Here's what I have tried:


Attempt1: In the custom button, set the retUrl=%2F{!Account.ID}
Result1: Upon clicking Finish in the flow, I loop back to the first flow screen, and the URL = /apex/UWRScheduler?sparkID=UWScheduler



Attempt2: Set the following in the Visualforce page:

finishLocation="{!URLFOR($Action.Account.View, Account.Id, null, true)}"


Invalid parameter for function URLFOR
Error is in expression '{!URLFOR($Action.Account.View, Account.Id, null, true)}' in component <flow:interview> in page uwrscheduler


Attempt3: Set the following in the Visualforce page:


 Result3: Clicking Finish in the flow logs me out of Salesforce!


Please help! My first flow is almost complete!

  • November 08, 2012
  • Like
  • 0

I know there have been a few posts about Flow finish location but I'm still confused about the below. Read documentation but can't figure out how to add a field value for this.


My VF page code is below. I want the finish location to be "..../apex/FacilityMain?id="{{!Address_Type__c.Facility__c}


I'm not understanding how, or if, I can write the URLFOR statement below to accomplish what's in bold above.  I can only see how to either hardcode values in the URLFOR statement or put an entire field value, not a combination of both.


<!-- Calls Flow and passes variables -->
<flow:interview name="AddressSearch" buttonLocation="bottom" finishLocation="{!URLFOR('/001/o')}">  **Want to rewrite this
<apex:param name="vaentrypoint" value="EnterNewAddressType"/>
<apex:param name="vafacilityid" value="{!Address_Type__c.Facility__c}"/>
<apex:param name="vaproviderid" value="{!Address_Type__c.Provider__c}"/>



Darrell D