SalesforceLabs / EnhancedLightningGrid

Component that allows you to sort and filter data within the Lightning Experience. Use as a replacement for a Related List, or create a new grid that shows results from a custom query.
BSD 3-Clause "New" or "Revised" License
136 stars 97 forks source link

Run Flow as Action? #29

Open ezrafischer opened 5 years ago

ezrafischer commented 5 years ago

Hi there,

Back with another question - thanks in advance for your help. Is there a way I can run a flow from a row button? I want to run a simple autolaunched flow that takes the row's object's record id as an input. Other than that, it'll just do its thing.

Thanks!

Ezra

greier commented 5 years ago

Plcae the flow in your component <lightning:flow aura:id="myFlowContainer"/>

in the js controller start it by giving the name of the flow and the parameters:

       var flow = component.find("myFlowContainer");
       var inputVariables = [
        {
        name : "myFlowVar",
        type : "String",
        value : component.get("v.recordId")
        }
     ];

        flow.startFlow("myFlowName", inputVariables );

hth