Sharing rules and manual sharing

When the organization-wide settings are set to Private or Public Read Only, sometimes, as per business need, we will have to share the record with other users apart from the record owner and users higher in the role hierarchy. OWD sets the restrictions, and additional mechanisms open up access. To provide this access, Salesforce provides a component known as Sharing Rules. With sharing rules, one can share records with users who don't have access to the records. Sharing rules allocate access to users in public groups, roles, or territories. They grant users who have no access, due to the OWD settings, additional access to the records. There are various ways a record can be shared. Let's discuss all of them one by one. One can navigate to the Sharing Settings screen and configure sharing rules.

Record ownership-based rules

While configuring record ownership-based rules, the user will need to select which records to be shared and which users these records need to be shared with. The owner can be Public Groups, Roles, Role and Subordinates, and Portal Users. The users to share with can be Roles, Roles and Subordinates, Public Groups, and Portal Users. These options are shown in the following screenshot:

Record ownership-based rules

For some of the objects such as account, we have the option to provide access to the related objects in this sharing rule (case and opportunity for the account object). The access level for the records that are shared needs to be provided in the sharing rule. This will include Read Only or Read/Write access.

Let's say that you want to share records owned by sales reps among other sales reps. The rule will be very simple, as shown in the following screenshot:

Record ownership-based rules

Criteria-based sharing rules

Criteria-based sharing rules allow the administrator to write rules to share records based on criteria. The criteria will be formula-based expressions (using AND or OR logic), which will use record fields. The interface to configure will look as shown in the following screenshot. The type will be criteria based instead of owner based. An example of using this type of rule can be, let's say, sharing all accounts with Field type as Customer directly with Roles as salesrep.

Criteria-based sharing rules

Manual sharing

In manual sharing, a Sharing button is provided on the record detail, and the admin keeps it intentionally on the page layout so that the owner of the record has access to share the records with other users.

Manual sharing

Apex-based sharing

Apex-based sharing is out of the scope for an admin to develop, but an admin can request a developer to build a trigger or batch to automatically share records using a program, depending on business logic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.189.5