Visualforce page to embed the flow on

This post is part of a series on building a replacement for stay-in-touch using visual workflow

The visualforce page is very simple, no controller required. It is designed to pull the contact ID from the query string (the URL).

This help article shows how to embed a flow in a visualforce page, and it looks like

<apex:page>
  <flow:interview name="MyUniqueFlowName"/>
</apex:page>

This help article shows how to set flow variables from a visualforce page, which then looks like

<apex:page>
    <flow:interview name="flowname">
        <apex:param name="myVariable" value="01010101"/>
    </flow:interview>
</apex:page>

Finally, this article shows how to pull parameters from the query string into a visualforce page, which looks like

$CurrentPage.parameters.parameter_name

So, putting it all together, your visualforce page would look like

<apex:page >
    <flow:interview name="Replacement_for_Request_Update">
      <apex:param name="vaContactID" value="   {!$CurrentPage.parameters.cid}">
      </apex:param>
    </flow:interview>
</apex:page>

No controllers required!

 
7
Kudos
 
7
Kudos

Now read this

Manipulating text in flows

i occasionally need to iterate over a list of records in a sObject collection, and display values from the records in a screen. back in the day i got some crucial help from salesforce yoda / mark ross on this developerforce post, which... Continue →