In Salesforce, we can share records with different users who have access to each record. When we share the records, the ownership also changes to the shared user.
In this Salesforce tutorial, we will learn about record sharing using Salesforce Flow, what sharing records means, and when we can use it.
Additionally, we will see how to create sharing records in Salesforce Flow with a scenario and explanation.
Sharing Record In Salesforce Flow
What is meant by sharing records in Salesforce?
In Salesforce, there are three types of sharing records:
- Owner-Based Sharing: In this type, we can share records owned by the specific user and determine the access level.
- Criteria-Based Sharing: In this sharing, we can set the conditions as criteria, and when the records meet that criteria, they will be shared with another user.
- Manual Sharing: We can share records manually in public groups, roles, and individual users. While sharing the records manually we can give Read-only or Read/Write access to whom we want to share.
Scenario to Create Custom Logic for Record Sharing in Salesforce Flow:
While working as a Salesforce Admin for a US-based Organization that provides software solutions, I was assigned the task of sharing Case records with the Salesforce Queue. The company currently operates in California, Florida, and Georgia.
Here, the Case raised from any of these regions will be assigned to the queue specifically created to handle the cases of that region. There are the following prerequisites to creating auto-launched flow in Salesforce:
- We need a Custom Picklist Field “Region” on the Standard Case Object with the following values: California, Florida, and Georgia.
- Then, we need Three different Queues to assign cases with the following names: California Queue, Florida Queue, and Georgia Queue.
How to Create a Flow in Salesforce to Share Records
Using the above scenario and the following steps, we will see how to create a flow in Salesforce to share records.
1. Log in to Salesforce Org. -> Click on the Setup. -> Home Tab. -> In Quick Find Box, Search for Flows. You will see an option under Process Automation. -> Click on Flows.

2. Click on the New Flow button to create a new flow.

3. We want to create a flow for creating the records, so we have to select the Record-Trigger flow. Then, click on the Create button.
You can read the whole article on Record-Triggered Flow in Salesforce.

4. Here, in the Object field, we need to select which object we want to create flow. In our scenario, we need to create flow on the Case Object. In the Configure Trigger option, we need to select when we want to invoke this flow.

5. In our scenario, when we select the Case Region value, the Case raised from any of these regions will be assigned to the queue specifically created to handle that region’s cases.
So, we have to select Fast Field Update, which is used when we want to execute flow before the record is saved to the database.

6. First, we need to get queue details in the flow. For that, we have the Get Records element; as we click on that element, we need to enter the following details.
- Label: This label will display on the canvas where the Get Records element is. Here, I have entered the Get Queue Details displayed on the Get Records element.
- API Name: It will automatically populate as we click the text box.
- Description: Description is optional; we can enter a short intro about our flow.
- Object: Here, we need to select from which object we will fetch the records; in this field, we have to select the Queue object, but in Salesforce, the behind-the-scene queue is also part of the Group, so we have to select the Group object.

7. Now, to assign a record, we have DeveloperName from the group object to relate with the Region from the Case Object. That means whenever we select a region from the case object, it will find a queue by using DeveloperName.

8. Now, we have to assign a case owner to the queue according to the value that we will select in the region.

9. After setting up all labels and conditions, click the Save button to save the flow. For that we need to enter the Flow Label; here, I have entered the Share Records using Salesforce Flow. The API Name will automatically populate as we click the text box. The Description is optional; we can enter a short intro about our flow.
Then click on the Save button.

10. It is best practice in the flow to always Debug the flow before activating it, and then, if no error occurs, Activate the flow.
Now, we will see step-by-step what we have done in the flow and its flow direction.
- Step 1: Here, we have to define on which object we have to create a flow.
- Step 2: Then we fetch Queue Object records from the queue that we have created already.
- Step 3: Then, we have to assign the queue as the owner according to the region.

11. To check whether the flow is working properly, go to the object on which you have created a flow. If you have selected trigger flow when the record is created, then create the record.
As per our scenario, the company currently operates in California, Florida, and Georgia. A case raised from any of these regions will be assigned to the queue specifically created to handle that region’s cases.

12. On the Details Page, you can see that the Case Owner has changed to vale and queue according to the Region field.

This is how we can share a record using the Salesforce Flow.
Conclusion
I hope you have an idea about sharing records in Salesforce with a flow. We have seen what sharing records means, their types, and when we can use them. Additionally, we have also seen how to create sharing records in Salesforce Flow with a scenario and explanation.
You may like to read:
- How to Launch Flow From Button in Salesforce
- How to Clone a Record with Flow in Salesforce
- How to Create an Email Template In Salesforce Flow
- How to Delete a Flow in Salesforce
- How to Delete Related Records Using Flow Action in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.