1

I need to run/call a flow in lightning component.i am getting the below error message :

Uncaught Error in $A.getCallback() [[object Object]] Callback failed: serviceComponent://ui.interaction.runtime.components.controllers.FlowRuntimeController/ACTION$runInterview

Lightning component code:

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction,lightning:availableForFlowScreens" access="global">

<aura:handler name="init" value="{!this}" action="{!c.init}" />
<div>

<lightning:flow aura:id="flowData"  />
</div></aura:component>

Controller:

({
init : function (component,event) {
    var flow = component.find("flowData");
     var inputVariables = [
        {
            name : "IDFrecordID",
            type : "Text",
            value : component.get("v.recordId")

        }

    ];
     flow.startFlow("Disclosure_Review_V21",inputVariables);


},})
1

Check for the following

  1. Your flow has an input variable created named "IDFrecordID".

  2. Also you can try using flowDataType datatype or use "String" in type variable as below

     var inputVariables = [
       {
        name : "IDFrecordID",
        type : "flowDataType",
        value : component.get("v.recordId")
    
      }
    ];
    
  • flowdatatype is text only. – velu Mar 14 at 1:13
  • Try with String then because I have never used or seen examples with type as Text ? – Mohith Shrivastava Mar 14 at 1:14
  • Also it's possible your flow itself is failing to execute and failing at run time – Mohith Shrivastava Mar 14 at 1:15
  • 1
    Its working flowdatatype changed to string.Thanks – velu Mar 14 at 1:16
  • Please mark is as answered if it helped . – Mohith Shrivastava Mar 14 at 1:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.