flow action to refresh the page

Flow action to refresh the page with example

In this blog post, we will learn how to install and use a flow action to refresh the page using Salesforce flows. We will also discuss different methods for launching flows in Salesforce.

Different ways to launch a flow:

Using a Button:

To access a specific flow, click the down arrow in the corresponding row. Select View Details and Versions to open the Flow Detail page.

Once there, you can find the URL for that particular flow. When creating a custom button or link, choose the URL as the Content Source and paste the flow’s URL.

Head to the Object Manager, select the object and click ‘Buttons, Links, and Actions’ Then, click ‘New Button or Link’ in the upper right-hand corner.

Please select the “detail page” button and copy and paste its URL into the designated area.

A flow action to refresh the page

Action:

Actions can only launch active screen flows. However, a screen element is not required for the flow. Access New Actions in Buttons, Links, and Actions for an object in Object Manager.

Hyperlink Formula Field:

It is possible to invoke an Auto-launched or Screen Flow using a hyperlink formula field. The process is similar to calling it by using a custom button.

To set up the hyperlink formula field to open the URL of the Flow, you can pass parameters in the same format used while calling it via a custom button.

Lightning Component or Visualforce Page

Autolaunched and screen flows are two types of flows that can be embedded in a Lightning Component or a Visualforce Page. These flows can receive data through input variables.

By embedding a flow, it is possible to customize the CSS of the screen elements and override the standard buttons of objects.

Lightning Page:

Active screen flows can be added to Lightning Pages, and they can be launched simply by viewing the page. It is also possible to enter values for the input variables of the flow if desired.

If the page is a Lightning Record Page, the record’s ID can be passed to any input variable. However, unlike when calling a flow by a custom button, other field values cannot be passed.

In the Lightning App Builder, drag and drop the Flow component from the left panel to anywhere on the screen. Then, select the active screen flow and, if necessary, assign the record ID to a variable.

How to Install Reload page package?

For Sandbox edition: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t8d00000024TZ

For Production or Developer edition: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t8d00000024TZ

A flow action to refresh the page

 

Business Scenario: Create a case record using Salesforce flow and reload the page once the case is created.

Configure Screen Flow:

Firstly, create a new resource for recording with resource type as a variable.

A flow action to refresh the page

Screen Element:
For Case Status, Drag and Drop the Picklist to the canvas. Generate a Picklist Choice resource for the Status picklist and select the same in the ‘Choice’ Field.
A flow action to refresh the page
A flow action to refresh the page
For Case Origin, add a new choice resource with the field ‘Origin’.
A flow action to refresh the page
Add Create Record Element: Generate a new Case record using the screen flow with field values for Status, Case Origin and recorded.
A flow action to refresh the page
Add Reload Page Element:
This is the final screen flow for creating case records.

To add the created flow to the account record page, navigate to the setup, click on the edit page, and drag and drop ‘Flow’ from the components into the page. Select the flow which we have created and save it. Once Activated the record page will be visible as shown below.

 

FAQ

What are the key components of a flow in Salesforce?

A flow typically consists of elements such as screens, variables, decisions, and actions. Screens gather user input, variables store and manipulate data, decisions control the flow based on conditions, and actions perform specific operations.

What is the primary use of Screen Elements in a Flow?

Flow screen elements are used for collecting and displaying user information in a friendly interface, guiding them through a process.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *