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.
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.
Add a Button to Call this Flow
Now create a button action in the account object. You can put this based on your requirement.
Add button in Page Layout
Add the above-created button to the respective page layout.
Test Current Record in Salesforce Flow:
Now test flow by clicking the button Get Record. It should show the account name.
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