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
sfdc-Lsfdc-L 

visual workflow?

Hi all, we can embed a visual workflow in visualforce page? and i want to visual workflow to be displayed in the webpage.please let me know whether it is possbile or not? Thanks!
Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

<apex:page controller="InsuranceController" sidebar="false">

  <div style="float: left; width: 400px; padding: 10px;">

    <flow:interview name="InsuranceFlow" interview="{!myFlow}" rerender="myScript"/>

  </div>

  <div style="float: left;">

    <iframe id="myFrame" frameborder="0" width="600" height="450"/>

  </div>

  <apex:outputPanel id="myScript">

    <script type="text/javascript">

      document.getElementById('myFrame').src='{!myFlow.resource}';

    </script>

  </apex:outputPanel>

</apex:page>

 

public with sharing class InsuranceController {

    public Flow.Interview.InsuranceFlow myFlow {get;set;}

 

    public InsuranceController() {

        myFlow = new Flow.Interview.InsuranceFlow(new Map());

    }

}

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.