You need to sign in to do that
Don't have an account?

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.
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); flow.startFlow("CDI_ICLE_NCHG",inputVariables); }
<lightning:button type ="submit" variant="brand" label="Next1" onclick="{!c.callIcleFlows}"/> <lightning:flow aura:id="flowData"/>
Greetings to you!
Please refer to the below links which might help you further with the above issue.
https://github.com/afawcett/flowtoolbelt/issues/7
https://www.biswajeetsamal.com/blog/invoke-flow-from-lightning-component-with-input-variables/
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