Hi folks, in this post I’m going to discuss the GET RECORD element in Salesforce flows.
Before we start with the topic, if you are new to Salesforce and want to know more about Salesforce flows and flow builders you can check out What is Salesforce Flow Builder and basic Building Blocks of Flow Builder
The GET RECORD element is used to fetch records from the Salesforce org.
In this example, we are going to create a Screen flow to learn about GET RECORDS element.
Screen flow appears as a screen and is displayed with the help of a lightning page or utility bar.
Learn more about Salesforce Flow Bootcamp
Once you drag the GET RECORD element from the toolbox on the canvas you need to add details like Label, Description, and object name.
Note – It is always a best practice to give your flow elements a description to add more clarity for future users.
Under the object label, you need to select the object from which you want to fetch the records.
Once you select the object you can filter the records to be fetched as per your scenario requirements.
Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course
While configuring the GET RECORD element in Salesforce flow you have a picklist with a Sort Order label which allows you to select the order in which you want to fetch the records.
The records can be fetched either in ascending, descending, or not sorted order. Sort By is the label where you can select the field on the basis of which the sorting should be performed.
We can store record data in flows using the following three ways:
i). Automatically Store All Fields – After you select this, a variable will be generated automatically, and you will be able to reference all of the fields later in the flow.
ii). Choose Fields and Let Salesforce Do the Rest –The benefit of utilizing this sort of approach to store data is that as the number of fields lowers, so does the system’s processing time. As a consequence, your flow execution will now be faster.
iii). Choose Fields and Assign Variables – To store record values manually in a screen flow or auto-launched flow, select “Choose fields and assign variables (advanced)”.
BUSINESS SCENARIO: The user at SalesforceGeek wants to fetch the record from the Account object with the following conditions:
i). AnnualRevenue is Greater than 1000 AND
ii). Industry is Education OR Agriculture
For more details about GET RECORDS element and solution of the business, scenario check out the video
One thought on “GET RECORD element in Salesforce flow”