EP - 28 | LAUNCH SCREEN FLOW FROM LWC | Flow with LWC⚡️

 

Launch Screen Flow From LWC

In this blog you will learn about a very new and useful feature which salesforce has given us in the Winter'23 release.
Now you can Launch your Screen Flows with LWC.🎉
Yes, you heard it right! 

Now we can work with Flows and LWC together and enjoy both the powerful tools.
But remember, You can only launch Screen Flows.

So, now we have a new tag in Lightning Web Component that is "lightning-flow".
Let's learn how easy it is to use this tag and how we can work with it.

For today's example I have a screen flow in which I have added a Display text and an Image.
Have a look :



Now, let's create a lwc component and add our flow in it.


Tag : <lightning-flow flow-api-name='Your Flow Api Name'></lightning-flow>

Add this tag where ever you want to add your flow and you are good to go.
After that we are adding the Lightning Web Component to a Lightning App.
I have created an app page with Lightning App Builder and added our component to that page.

Here is the output :


That's how you can easily add Screen Flows to LWC.
Hope you found this useful.
For detail tutorial checkout this video:





If you have any question please leave a comment below.

If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Thanks
Let's learn and grow together.
Love and Peace! 

Post a Comment

0 Comments