![How to Use the Action Button Component in Screen Flow How to Use the Action Button Component in Screen Flow](https://salesforcetime.com/wp-content/uploads/2024/04/How-to-Use-the-Action-Button-Component-in-Screen-Flow-678x381.png)
Salesforce introduced the Action Button component in the Summer '24 release. This game-changing feature allows you to run autolaunched flows directly from flow screens. Unlike running subflows, it is possible to run autolaunched flows without leaving the screen. Moreover, you can get outputs from the flow and use them within your screen.
Game-changing features often come with complex configuration requirements. Surprisingly, configuring this component takes just a few clicks. Here's a guide on how to use the Action Button component in a screen flow.
Let's use the Action Button to get the related Case and Contact records of the selected Account.
Configuring the Action Button Component
1- Build an autolaunched flow that gets the related Case and Contact records of the Account. In order to do that, create an input text variable for the Account Id and output record collection variables for Case and Contact.
![Input Variable](https://salesforcetime.com/wp-content/uploads/2024/04/image-44-1024x461.png)
![Output Variable](https://salesforcetime.com/wp-content/uploads/2024/04/image-45-1024x463.png)
Your flow should look like this.
![Autolaunched Flow](https://salesforcetime.com/wp-content/uploads/2024/04/image-46.png)
2- Build a new screen flow with any kind of record selection (picklist, radio button, data table, lookup, etc.). Let's use a lookup component to choose an Account record.
![Lookup Component](https://salesforcetime.com/wp-content/uploads/2024/04/image-47-1024x470.png)
3- Add an Action Button component to the screen. Give it a name and choose the autolaunched flow that you want to call.
![Adding the Action Button Component](https://salesforcetime.com/wp-content/uploads/2024/04/image-48-1024x241.png)
Pass the selected Account's Id as an input value. As you can see, it displays the output variables of the autolaunched flow.
![Passing an input value to an autolaunched flow](https://salesforcetime.com/wp-content/uploads/2024/04/image-49.png)
4- Let's add data table components to display the output variables of the autolaunched flow.
![Data Table to Display the Outputs](https://salesforcetime.com/wp-content/uploads/2024/04/image-50-1024x315.png)
For the source collections, use the outputs of the component (Cases and Contacts are record collections).
5- At the end, your screen will work like this.
![Action Button Demo](https://salesforcetime.com/wp-content/uploads/2024/04/Action-Button.gif)
Action Button Component with HTTP Callout
It is possible to use the Action Button component to make an HTTP Callout too. Just build an autolaunched flow that makes the callout and returns the output to your screen.
For example, here is a screen flow to create a Lead record in Salesforce. Action Button passes the email address to an autolaunched flow that makes an HTTP callout to validate the email.
![Autolaunched Flow with HTTP Callout](https://salesforcetime.com/wp-content/uploads/2024/04/image-54.png)
![Action Button and HTTP Callout](https://salesforcetime.com/wp-content/uploads/2024/04/image-55-1024x359.png)
Pay attention that there is a disabled checkbox field on the screen. It becomes true if the email is valid. Additionally, there is a validation rule in place that prevents the user from proceeding if the email is invalid.
![Checkbox Configuration](https://salesforcetime.com/wp-content/uploads/2024/04/image-52.png)
At the end, it works like this:
![Action Button - Email Validation](https://salesforcetime.com/wp-content/uploads/2024/04/Action-Button-Email-Validation.gif)
Summary
Salesforce introduced the Action Button component in the Summer '24 release. It is a game-changing feature that allows you to run autolaunched flows directly from flow screens. This functionality opens up a world of possibilities!
Love it!