• Kerry Townsend
  • NEWBIE
  • 0 Points
  • Member since 2013


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

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:

 

https://na4.salesforce.com/apex/UWRScheduler?acct_id={!Account.Id}&acct_name={!Account.Name}

 Here is the Visualforce page without any finishLocation set:

 

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

 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)}"

Result2:

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:

finishLocation="{!URLFOR('/{!Account.Id}')}"

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

 

Please help! My first flow is almost complete!

  • November 08, 2012
  • Like
  • 0
Does anyone have a lead age formula that only counts business days and excludes the weekend?  It would be great if the formula also takes into consideration holidays.


thanks,
p