• JD323
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
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>

 
  • June 17, 2016
  • Like
  • 1
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>

 
  • June 17, 2016
  • Like
  • 1

HI,

 

I would like to find out how I could make a flow end at a custom location, more specifically make it end at the place where it was started/clicked, which is a VF page within a button on a record detail page.

 

Here is the VF page that I've created, I only need it to end at the Contact Id page where it was clicked (the flow already has a variable with the Contact Id called ContactID.

 

All help is much appreciatted!

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>