You need to sign in to do that
Don't have an account?
Delinda Tinkey
Get multiple variables from flow to define the destination URL when flow is complete
I have a working controller (below) that passes a variable from a flow to a destination URL (finishlocation) when the flow is complete.
As I am still learning APEX, can someone explain how I can get more than one variable from the flow and add it as parameters to my finishlocation?
For example:
PageReference pageRef = new PageReference('/' + flowContactId + ? + Id2 + & + Id3 )....etc.
THANK YOU
Controller:
public class SurveyFlowController {
public Flow.Interview.Survey_Flow_Test myflow {get;set;}
// Set the page reference accessor methods
public PageReference finishlocation {
get {
PageReference pageRef = new PageReference('/' + flowContactId );
pageRef.setRedirect(true);
return pageRef;
}
set { finishlocation = value; }
}
// Set the accessor methods for the flow output variable
public String flowContactId {
get {
String strTemp = '';
if(myflow != null) {
strTemp = string.valueOf(myflow.getVariableValue('varContactID'));
}
return strTemp;
}
set { flowContactId = value; }
}
}
Visualforce Button:
<apex:page Controller="SurveyFlowController" > <flow:interview name="Survey_Flow_Test" interview="{!myflow}" finishlocation="{!finishlocation}" /> </apex:page>
As I am still learning APEX, can someone explain how I can get more than one variable from the flow and add it as parameters to my finishlocation?
For example:
PageReference pageRef = new PageReference('/' + flowContactId + ? + Id2 + & + Id3 )....etc.
THANK YOU
Controller:
public class SurveyFlowController {
public Flow.Interview.Survey_Flow_Test myflow {get;set;}
// Set the page reference accessor methods
public PageReference finishlocation {
get {
PageReference pageRef = new PageReference('/' + flowContactId );
pageRef.setRedirect(true);
return pageRef;
}
set { finishlocation = value; }
}
// Set the accessor methods for the flow output variable
public String flowContactId {
get {
String strTemp = '';
if(myflow != null) {
strTemp = string.valueOf(myflow.getVariableValue('varContactID'));
}
return strTemp;
}
set { flowContactId = value; }
}
}
Visualforce Button:
<apex:page Controller="SurveyFlowController" > <flow:interview name="Survey_Flow_Test" interview="{!myflow}" finishlocation="{!finishlocation}" /> </apex:page>
Check the below code for sample Check this link - https://help.salesforce.com/HTViewHelpDoc?id=pages_flows_getting_values.htm&language=en_US