I've created a visualforce page with an Apex controller and have a button that should open a Screen Flow but am unable to do so.
Here is the code that should call the flow:
public void openOpportunityFlow() {
Map<String, Object> inputVariables = new Map<String, Object>();
inputVariables.put('LeadId', selectedLeadId);
String flowApiName = 'Open_Opp_Screen_Flow';
Flow.Interview flowInterview = Flow.Interview.createInterview(flowApiName, inputVariables);
flowInterview.start();
}
The error I'm getting is "Start can't be called on a flow with the process type Screen Flow."
I've done some searching online and am having trouble finding anyone else with the issue.