How to Use Reactive Screen Actions in Flow : Yumi Ibrahimzade
by: Yumi Ibrahimzade
blow post content copied from Salesforce Time
click here to view original post
**Summary of Salesforce's New Action Button Component and Reactive Screen Actions** Salesforce has launched a new feature called the Action Button component in its Summer '24 release. This feature enables users to run autolaunched flows directly from flow screens, but it requires a button click, which may not suit all scenarios. However, starting with the Spring '25 release, users will be able to set up Screen Actions that allow autolaunched flows to run automatically without needing to click a button. **How to Use Reactive Screen Actions in Flow:** 1. **Create an Autolaunched Flow:** This flow should return Opportunity records related to a selected Account. It takes an Account ID as input and outputs a collection of Opportunity records. 2. **Build a Screen Flow:** Add a Screen element with a selection component (like a Lookup) to choose an Account. 3. **Add Screen Action:** Within the Screen Properties, add a Screen Action that links to the autolaunched flow. Set the Account ID as the input. This action will trigger the flow automatically whenever the Account selection changes. 4. **Display Output:** Use a Data Table component to show the Opportunity records that are returned by the flow. You can add multiple Screen Actions to a single screen, allowing for various functionalities, such as summarizing selected Opportunity records or performing other operations like creating or updating records. **Additional Use Cases:** - Reactive Screen Actions can be used for various tasks, including making HTTP callouts (e.g., querying ChatGPT) or managing file uploads by displaying uploaded files in a Data Table to avoid confusion. The possibilities with Screen Actions are extensive, making them a powerful tool for enhancing user interactions in Salesforce flows. **Relevant Hashtags for SEO:** #Salesforce #FlowAutomation #ScreenActions #AutolaunchedFlows #SalesforceSummer24 #SalesforceSpring25 #UserExperience #NoCode #CRM #SalesforceTips
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. However, you have to click a button, which may not be ideal for some use cases. Starting with the Spring '25 release, you can configure Screen Actions to run autolaunched flows without needing to click a button.
Here is how to use reactive screen actions in flow.
Reactive Screen Actions in Flow
Let's build a Screen Flow that lets the user choose an Account record and then displays the related Opportunity records.
1- Create an autolaunched flow that returns the related Opportunity records of an Account.
AccountID text variable is marked as input and OpportunityRecords record collection variable is marked as output. This means that this autolaunched flow receives the Id of an Account record and returns a collection of Opportunity records.
2- Create a Screen Flow, add a Screen element and add a selection component to choose an Account record. For instance, let's use the Lookup component.
3- Screen Action feature is not a separate screen component but a part of the Screen element itself. Go to the Screen Properties and add a new Screen Action.
Choose the autolaunched flow that you created and set the Id of the Account as an input.
Since Screen Action is reactive, it will run the autolaunched flow whenever the input value is changed. Therefore, whenever you choose an Account record from the lookup, it will run the autolaunched flow.
4- We want to display the output of the autolaunched flow. Let's add a Data Table component to display the output (Opportunity records).
As you can see, whenever you choose an Account, it runs the autolaunched flow and displays the related Opportunity records.
Screen Actions are not limited to one. You can add multiple Screen Actions to the same screen. For instance, here is an additional Screen Action that summarizes the selected Opportunity records.
What Else Can Be Done?
Reactive Screen Actions are not limited to getting records. Since you are calling an autolaunched flow, you can almost do anything that you need. From creating/updating records to making HTTP callouts.
For instance, in the example below, whenever the question field is changed, the Screen Action automatically runs an autolaunched flow that makes a callout to ChatGPT and returns the answer.
Let's see another example related to the file upload component. The standard File Upload component in Screen Flow doesn't have an indication that shows if you uploaded a file. This might be confusing and may cause uploading the same file multiple times. Here is a workaround that you can build using the Screen Action feature. When you upload a file, it retrieves the files and displays them in a Data Table.
The potential use cases for the Screen Action feature are truly limitless!
The post How to Use Reactive Screen Actions in Flow appeared first on Salesforce Time.
December 26, 2024 at 08:19PM
Click here for more details...
=============================
The original post is available in Salesforce Time by Yumi Ibrahimzade
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================
Post a Comment