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
Tina0204Tina0204 

Get data from flows to Lightning component

Hi All,
My use case is that I want to invoke a Flow from a Lightning component. The Flow should return a list of records to the Component and then finally displayed on the component.

Can someone tell me if I can use the 'Get Records' element of the Flow to get the records. Then hpw can I return them to the Component so as to display them.

Any help appreciated..
Thanks!
ShirishaShirisha (Salesforce Developers) 
Hi Tina,

Greetings!

Can you please check the below thread for the sample code to get the records from Flow to lightning component:

https://salesforce.stackexchange.com/questions/274131/pass-object-from-flow-to-lightning-component

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.

Warm Regards,
Shirisha Pathuri
Naveen KNNaveen KN
Hi Tina, out of curiosity, why do you want to call flow to get the records instead of directly hitting the apex class?

Naveen