I have a flow in place for Opportunity creation from the Account. The flow requires some fields to be completed on the Account before the Opportunity can be created. I also want the user to be re-directed to the Opportunity Products page upon creation. In order to do this, I created a custom VF page and controller and utilized the Flow component in the VF page. However, when I try to save the VF page, I get the error:
Error: No variable named "AccountWebsite" in flow.
In the flow, the variable name listed in the Decision for requiring a website is called AccountWebsite, which is what I have in my VF page. The variable is a text variable and private. Does anyone know I am getting this error?
VF Page:
<apex:page standardController="Account" tabStyle="Account" Extensions="OpptyFlowController" recordSetVar="opportunities">
<flow:interview name="Create_Opportunity_w_Parent_Fixed" finishLocation="{!OID}">
<apex:param name="AccountId" value="{!Account.Id}"/>
<apex:param name="AccountWebsite" value="{!Account.Website}"/>
<apex:param name="AccountIndustry" value="{!Account.Industry}"/>
<apex:param name="AccountCountry" value="{!Account.BillingCountry}"/>
<apex:param name="AccountSubIndustry" value="{!Account.Sub_Industry__c}"/>
</flow:interview>
</apex:page>
VF Controller:
public class OpptyFlowController {
public ApexPages.StandardSetController stdControl{get; set;}
public OpptyFlowController(ApexPages.StandardSetController controller) {
stdControl = controller;
}
public Flow.Interview.Create_Opportunity_w_Parent_Fixed OppFlow { get; set; }
public String getOppID() {
if (OppFlow==null) return '';
else return OppFlow.OpportunityId;
}
public PageReference getOID(){
PageReference p = new PageReference('/p/opp/SelectSearch?addTo=' + getOppID() + '&retURL=%2F' + getOppID());
p.setRedirect(true);
return p;
}
}
Flow:
Flow Error: