How many ways can we share a record in Salesforce?

0 votes
Sylvester Balchunas asked 02-Feb-2018 in SalesForce by Sylvester Balchunas

How many ways can we share a record in Salesforce?

1 Answer

1 votes
Tarun Gautam answered 03-Feb-2018 by Tarun Gautam

Some of the ways to share a Record:

Manual Sharing:

If you want to share a single record with a single user or group of the users then you can use Manual Sharing.

Manual Sharing can be done from the detail page of the record, there is a button available for Manual Sharing and this is visible only when OWD setting is private.

Role Hierarchy:

If you want to add a user to a role, then the user who is above in the role hierarchy will have read access.

To get the Steps follow this:
Go to the Setup section -> find the Manage Users from the search -> roles -> setup roles -> click on ‘add role’ -> provide name and click on save.

Apex sharing:

Sharing through the Apex is available for each and every object. Salesforce provides sharing objects for every object for example Account object’s share object is AccountShare.
By using Apex want to share the records you have to create a record to the shared object.

Criteria Based Sharing rules:

Sharing objects is always based on conditions, for example, you want to share records with a user’s group, with the criteria of the country is India.

Follow the Steps for Criteria Based Sharing:
Go to the Setup -> find the Security Controls from the Quick Find/Search field -> click on Sharing Settings -> here select the object and provide name and Conditions and after click on Save button.


OWD stands for “Organization Wide Default Setting”. This is used to give permissions to the organization-wide and it defines the baseline settings.

Organization-wide default setting defines the user's accessibility level where a user can see the other user’s record.
The organization-wide default setting can be Public as read Only, Private, Public Read and Write.

Follow the Steps for OWD settings:

Go to the Setup -> find the Security Controls from the Quick Find/Search field-> click on Sharing Settings -> after that Click on “Edit” button, nowhere change the default sharing rules as needed.

This could require significant system resources and time depending on the amount of data in your organization. Setting an object to Private makes records visible to record owners and those above them in the role hierarchy, and access can be extended using sharing rules.