+ Start a Discussion
Ravi Sankar 12Ravi Sankar 12 

calling a flow on click of a button in lightning

I'm trying to call a flow on click of a button in lightning component. It looks like nothing is happening. Im getting the below error.
Uncaught Error in $A.getCallback() [[object Object]]
Callback failed
I appreciate your help.
callIcleFlow : function (component) {       
                var flow = component.find("flowData");
                //Put input variable values
                var inputVariables = [
                        Connection_Mode : component.get("v.communicationChannel"),                       
                        Contact_Name : component.get("v.contactName")                        
                   /* {
                        name : "Connection_Mode",
                        type : "String",
                        value : component.get("v.communicationChannel")
                        name : "recordId",
                        type : "String",
                        value : component.get("v.recordId")
                    } */

                //Reference flow's Unique Name
                console.log('input flow parameters ' + inputVariables); 
<lightning:button type ="submit" variant="brand" label="Next1" onclick="{!c.callIcleFlows}"/>
     <lightning:flow aura:id="flowData"/>

Best Answer chosen by Ravi Sankar 12
Khan AnasKhan Anas (Salesforce Developers) 
Hi Ravi,

Greetings to you!

Please refer to the below links which might help you further with the above issue.



I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas