I'm trying to launch flow from lightning component + putting this lightning component inside my record page, so it will fired when the page is loaded.

I set everything as needed, but it seems that the variable is not been passed to the flow .. Can someone please help me and check if i'm doing something wrong ?

Thanks !

My Component:

 <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}"/>
<lightning:flow aura:id="flowData"/>

My controller:

init : function (component) {

    console.log('inside controller');

    // Find the component whose aura:id is "flowData"
    var flow = component.find("flowData");

    var inputVariables = [
                    name : "CaseId", 
                    type : "String", 
                    value: component.get("v.recordId")

    // In that component, start your flow. Reference the flow's API Name.
    flow.startFlow("Testing_Flow", inputVariables);


  • is there a reason you are not using the standard flow component? it is aware of the record ID and would load on page load.
    – gorav
    Commented Feb 25, 2020 at 16:52

1 Answer 1


The problem may be inside the flow you're calling. Make sure you have a Variable resource of type Text with name CaseId and with the Input checkbox checked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .