function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
William Woodson 3William Woodson 3 

lightning component embedded in flow how to pass record id

I have a lightning component embedded in a flow, how do I pass the recordId from the flow into the lightning component?

Everything I have found shows the old flow designer.  The new lightning flow designer does not have an option to set input fields on the lightning component.

Thanks.
Alain CabonAlain Cabon
Hi William,

The interface of a lightning component is defined by the design resource where you defined the attributes to pass.

Configure Components for Flow Screens:
Make your custom Aura components available to flow screens in Flow Builder by implementing the lightning:availableForFlowScreens interface.
To make an attribute’s value customizable in Flow Builder, add it to the component's design resource. 

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_flow_screens.htm
 
Tushar sharmaTushar sharma
Although I have used the LWC you can follow the same steps to pass data.

https://newstechnologystuff.com/2019/10/20/lightning-web-components-in-lightning-flow/