function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JD323JD323 

Set Flow FinishLocation for Salesforce1

I'm looking for a way to set a flow's finishlocation to render in both Salesforce1 and web. Specifically, I want the flow to finish back at the record from which it started. The flow is initiated via a hyperlink on Opportunity. After it processes, I want the user to be returned to the refreshed Opportunity record without any additional clicks.

If you can't tell from my post, I'm new to all of this. A detailed response would be much appreciated.

I've found the following javascript as a starting point, but I'm not sure how to piece it together with my vf page to set the finish location.
function navigate (recordId){
			 
				if (typeof sforce !== 'undefined'){
					sforce.one.navigateToSObject(recordId);
				} else {
			        window.top.location.href= "/" + recordId;
			    }
			 
			}

Here's the vf page that hosts my flow:
<apex:page standardController="Opportunity">
<flow:interview name="MyBest" finishLocation= "{????}"> 
    <apex:param name="vAction" value="{!$CurrentPage.parameters.vAction}"/>
    <apex:param name="vUserID" value="{!$CurrentPage.parameters.vUserID}"/>    
    <apex:param name="vRecordID" value="{!$CurrentPage.parameters.vRecordID}"/>    
    <apex:param name="vObjectType" value="{!$CurrentPage.parameters.vObjectType}"/>
    
   </flow:interview> 
</apex:page>