I've created a custom List button on the Opportunity. When clicking the button, the user is redirected to a VF page that invokes a custom flow from a custom controller. The flow works properly on its own, however, when I try to invoke it using the custom button, it states I need to enter a website and country (which are required in the flow). However, these 2 fields are already populated on the Account record. Does anyone know why the flow is not recognizing them through the controller?
VF Page:
<apex:page standardController="Opportunity" tabStyle="Opportunity" Extensions="OpptyFlowController" recordSetVar="opportunities">
<flow:interview name="Create_Opportunity_w_Parent_Fixed" finishLocation="/p/opp/SelectSearch?addTo={!opportunity.Id}&retURL=%2F{!opportunity.Id}"/>
</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;
}
}