Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Embed Flows in Visualforce Pages
- Find the flow's API name.
- From Setup, enter Flows in the Quick Find box, then select Flows.
- Click the name of the flow that you want to embed.
- Define a new Visualforce page or open one that you want to edit.
- Add the <flow:interview> component, somewhere between the <apex:page> tags.
- Set the name attribute to the unique
name of the flow. For example:
1<apex:page> 2<flow:interview name="flowAPIName"/> 3</apex:page> - Restrict which users can run the flow by setting the page security for the
Visualforce page that contains it. To run the flow, external users (such as on an Experience Cloud site) need access to the Visualforce page. To run the flow, internal users need access to the Visualforce page and either:
- The "Run Flows" permission
- The Flow User field enabled on their user detail page
- If Override default behavior and restrict access to enabled profiles or permission sets is selected for an individual flow, access to that flow is given to users by profile or permission set
Setting Variable Values in a Flow
1<apex:page>
2 <flow:interview name="ModemTroubleShooting">
3 <apex:param name="vaCaseNumber" value="01212212"/>
4 </flow:interview>
5</apex:page>1<apex:page standardController="Case" tabStyle="Case" >
2 <flow:interview name="ModemTroubleShooting">
3 <apex:param name="vaCaseNumber" value="{!Case.CaseNumber}"/>
4 </flow:interview>
5</apex:page>For more examples of setting variable values, see Set Flow Variable Values from a Visualforce Page. For information about getting variable values from a flow to display in a Visualforce page, see Get Flow Variable Values to a Visualforce Page.
Setting the finishLocation Attribute
1<apex:page standardController="Case" tabStyle="Case" >
2 <flow:interview name="ModemTroubleShooting" finishLocation="{!URLFOR('/home/home.jsp')}">
3 <apex:param name="vaCaseNumber" value="{!case.CaseNumber}"/>
4 </flow:interview>
5</apex:page>For more examples of setting finishLocation, see Configure the finishLocation Attribute in a Flow.