Home SalesforceFlow Getting the current Record in Salesforce Flow

Getting the current Record in Salesforce Flow

by Dhanik Lal Sahni

We can get the current record id in the Salesforce flow. We sometimes need complete sObject records in flow to get field value. This post will help in getting the current Record in Salesforce Flow.

To get the current record id in Salesforce Flow, we create a text variable with API name recordId. Similarly, if we want to get the current record in the flow then we have to make a record variable of a particular sObject type.

Create Screen Flow

Create a screen flow with the name Get Record and create a variable with record id.

Current Record in Salesforce Flow - SalesforceCodex

In the above image, we have created recordId variable of the record data type and the object is Account.

Note: Make sure you selected Availability Outside the flow as Available for input.

Display Record Information in Flow

Let us test this functionality by showing the account name in the display text.

Display Text n Salesforce Flow - SalesforceCodex

Add a Button to Call this Flow

Now create a button action in the account object. You can put this based on your requirement.

Button Action in Flow - SalesforceCodex

Add button in Page Layout

Add the above-created button to the respective page layout.

Action Button on Page Layout- SalesforceCodex

Test Current Record in Salesforce Flow:

Now test flow by clicking the button Get Record. It should show the account name.

Test Flow in Salesforce - SalesforceCodex

Related Posts:

Verify Phone using Flow HTTP Callout

Custom Toast with custom duration In LWC

Posting Rich Text Chatter using Apex

Show User Record Access Using Flow

You may also like

Leave a Comment

Top 10 Salesforce Service Cloud Features Top 10 Best Practices for Lightning Flow Facts and Statistics for Salesforce’s Size and Market Share Top 5 Contract Management Salesforce Apps Top 10 Enterprise Integration Use Cases