If the Organization-Wide Settings (OWD) in your Salesforce Org is set to anything other than “Public Read/Write” for any of the standard or custom objects then it is more than likely that you will need to setup some sharing rules to share these records with other users. So what are the different ways to share records? Here is a checklist of all the different ways (22 that I could think of) in which you can share records in Salesforce. You can use this as a quick reference guide to help you determine which of these options will be most appropriate to meet your business requirements.
And the following presentation gives you a little more information about each of these sharing options.
Great work. Appreciate it.
Thanks for the post. Is there a way to securely share the data input by customers in forms to a team of investment agents.
Hi Priti, the data input by customers will be saved in standard/custom object in Salesforce. To securely share the data with investment agents, you need to use sharing rules to ensure that only authorized users can access the data in this object.
Hello,
Is there a way for a system admin to view ALL records that are shared manually?
Hi Brad, the answer to your question is no, Salesforce does not provide a way for you to view all records that are shared manually.
Behind the scenes, the record sharing details on objects are stored in a “Share” object. For example, for standard Account object, the record sharing details are stored in an object ‘AccountShare’ and for custom object, it will be stored in ‘Custom_Object__Share’.
There is a field in this share object called ‘RowCause’, which will store the value ‘Manual’ if the record has been shared manually. So the best you can do is to get the list of manually shared records for each object with a SOQL query like this
SELECT Id, ParentId, AccessLevel, UserOrGroupId, RowCause FROM__Share Where RowCause = 'Manual'
Do take a look at this article ‘Record-Level Access: Under the Hood‘ for a very good explanation on how record sharing works.
Hope this helps.
Hi Ashish Sir – Thanks for sharing this post, its really amazing. I wanted to understand, Is there a way to share record with someone who is outside of salesforce. My preference is via email.
Thanks Gunjan. You can share records with someone who is outside of Salesforce through email. You can create a Classic/Lightning email template with merge fields to get the data from Salesforce record and send this email either manually from within Salesforce or automatically through Salesforce Flows/process builder or workflow rules. You may want to chekcout my blog post on step-by-step guide to using email templates in Salesforce at URL https://www.asagarwal.com/step-by-step-guide-to-using-email-templates-in-salesforce/
This is really help full for people like me who is re entering into workforce after a break.
Great post! I’d like to know if it is possible to do a “mass sharing” as I have 2 users with the same role and profile that need access to the records either one of them create, but that’s not happening and there are over 1000+ records to be shared, which would make manual share a pain.
Hi Miza, sure you can do this by creating an ownership-based sharing rule. Share the records owned by the role with the users of the same role.
Hey Ashish,
Really Awesome Post!!!
As per my understanding #6 will only work for Custom Objects if Grant Access Using Hierarchies is checked. If my understanding is correct Could you please add to the slide 17 as well ?
Hi Sanjog. Yes, that is correct. For custom objects, we need to check ‘Grant Access Using Hierarchies’. I have updated the presentation. Thanks very much for your feedback.
Hey,
is it possible to create sharing for several user (the users are dynamic and will change in each record)
Hi Elion, yes it is possible using Apex Sharing. You may want to refer to URL https://automationchampion.com/tag/sharing-a-record-using-flow-and-process-builder/ for more information on this. Thanks, Ashish
Good post Ashish , on emore way Account Relationship Data Sharing – https://www.youtube.com/watch?v=pKaMGNs0DSc
Thanks Jitendra, I need to add this to the list 🙂
On the 8th slide,you mentioned queue does not act as the owner of task object but currently salesforce enabled this feature to assign queue for task object.
Thanks for highlighting that Swaminathan. The slide will be updated by 24th May 2020
Ashish,
Using #1, #2 and #3 we are controlling Object and field level permissions.
Not the record level permissions. Please correct me if I am wrong.
Hi Raghavendra, yes that’s correct. #1, #2 & #3 are object and system level permissions and not record level permissions. But these permissions do impact the record visibility.
Hi Ashish,
I have a query , how to share the Account records to any user those are previously shared with any user. for Ex User A in moving so I want to Share all Account records to User B whichever were shared to A. How can I achieve it. I tried it using Batch to update AccountID and UserOrGroup field of AccountShare object but cant achieve this as both the fields are non writable.
please help me on this.
Thanks in Advanced.
RD
Hi RD,
If User A was the Account owner, than you can just use the ‘Mass Transfer Records’ feature in Setup to transfer those Accounts to User B. If you can’t do that then you need to make sure that user B is in same Group & Role as User A, is added to all account teams as User A and so own. You can’t update records in AccountShare object directly if the RowCause is not ‘Manual’. Hope this gives you some idea.
Regards,
Ashish
Your powerpoint finally helped me understand sharing and security settings in SF. Thanks so much!
How can I implement in Salesforce? TIA 🙂
Julie Elangwey
I would like help in how to become salesforce admin certified