0
//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.

1
  • Hi there, just to confirm, does this happen for all navigation using this component or is it only thrown when it is added to the last screen in the Flow? Feb 26 at 21:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy