//auracomponent.cmp file
<aura:component access="global" implements="lightning:availableForFlowScreens">
<div class="slds-align_absolute-center" style="">
<lightning:button
label="next" aura:id="NEXT"
onclick="{!c.onButtonPressed}"/>
</div>
</aura:component>
//auracomponentcontroller.js file
({
onButtonPressed: function(cmp, event) {
// Figure out which action was called
//
var actionClicked = event.getSource().getLocalId();
alert(actionClicked);
// Fire that action
var navigate = cmp.get("v.navigateFlow");
alert("hello again!");
navigate("NEXT");
}
})
I am wanting to navigate to the next flow screen. It works fine in debug mode. But on the record page I get the error "[NoErrorObjectAvailable] Script error.".
Using window alerts I have pin pointed the error to the last line in my controller file. "navigate("NEXT")".
I cannot seem to find a solution to this basic problem. Kindly help.