This is how the flow is called:
Custom button
Visualforce page
Controller<apex:page controller="SplitCustomBundlesController" action="{!goopp}" showHeader="false" sidebar="false" lightningStylesheets="true">
<flow:interview name="Split_Custom_Bundles" interview="{!my_interview}" finishlocation="{!NewLoc}">
<apex:param name="OppId" value="{!oppId}" />
</flow:interview>
</apex:page>
Flowpublic class SplitCustomBundlesController {
public Flow.Interview.Split_Custom_Bundles my_interview {get; set;}
public string oppId {get;set;}
public PageReference getNewLoc() {
PageReference newloc;
newloc = new PageReference('/' + oppId);
return newloc;
}
public void goopp() {
oppId = ApexPages.currentPage().getParameters().get('oppID');
}
}
Debug Screen
Debug Text
Problem solved. I found that there was a case disparity for the oppId parameter between the VF page and the flow. In the VF page I was using
<apex:param name="OppId" value="{!oppId}" />
But in the flow the name of the variable is "oppId". I must have modified the VF page inadvertently to cause the problem.