I've searched and tested out many solutions listed on the site but still not able to have my Screen flow closed when calling from Global Action. The screen flow will create the Case record then a new screen flow page will pop up. I'm using Lightning component to call the screen flow. Below is the component and Controller for lightning component.
Any help will be appreciated.
COMPONENT
<aura:component
implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.Init}" />
<lightning:flow aura:id="flowData" />
</aura:component>
CONTROLLER
({
Init : function (component,event,helper)
{
var flow = component.find("flowData");
flow.startFlow("ScreenFlow");
},
/*On change listener*/
handleStatusChange : function (component, event) {
if(event.getParam("status") === "Next") {
var outputVariables = event.getParam("outputVariables");
var outputVar;
for(var i = 0; i < outputVariables.length; i++) {
outputVar = outputVariables[i];
if(outputVar.name === "ScreenFlow")
$A.get("e.force:closeQuickAction").fire();
}
}
}
})