Skip to content

Sharing rules in Salesforce

Salesforce Sharing Rules

Sharing rules in Salesforce are used to grant extended access to records for specific users or groups of users, especially when the organization-wide default (OWD) settings are set to Private or Public Read Only. They allow administrators to maintain data privacy while providing access to users who need it for their roles. Sharing rules can be set up for both standard and custom objects.

There are two types of sharing rules in Salesforce:

  1. Criteria-Based Sharing Rules
  2. Ownership-Based Sharing Rules

Let’s analyze each type in detail with examples.

  1. Criteria-Based Sharing Rules:

Criteria-Based Sharing Rules grant access to records based on field values. You can define criteria using the fields and values that suit your organization’s requirements. When a record matches the criteria, it will be shared with specified users or groups.

Example: Let’s say you have an organization-wide default (OWD) setting for the Opportunity object set to Private. You want to share opportunities with a specific industry (‘Software’) with the ‘Software Sales’ public group. You can create a criteria-based sharing rule with the following settings:

  • Object: Opportunity
  • Criteria: Industry equals ‘Software’
  • Share with: ‘Software Sales’ public group
  • Access Level: Read/Write

This rule will automatically share all opportunities with the ‘Software’ industry with the ‘Software Sales’ public group, granting them Read/Write access.

  1. Ownership-Based Sharing Rules:

Ownership-Based Sharing Rules grant access to records based on the record owner. These rules are useful when you want to share records owned by specific users or roles with other users, groups, or roles.

Example: Assume the OWD setting for the Case object is set to Private. You want to share all cases owned by the ‘Support Team’ role with the ‘Escalations Team’ role. You can create an ownership-based sharing rule with the following settings:

  • Object: Case
  • Owned by members of: ‘Support Team’ role
  • Share with: ‘Escalations Team’ role
  • Access Level: Read/Write

This rule will automatically share all cases owned by users in the ‘Support Team’ role with users in the ‘Escalations Team’ role, providing them with Read/Write access.

Keep in mind that sharing rules are evaluated in real-time when records are created or updated. Additionally, they cannot be used to restrict access to records; they can only grant additional access beyond the OWD settings.

In summary, sharing rules in Salesforce are powerful tools that allow administrators to provide users with necessary access to records while maintaining data privacy. By understanding the differences between criteria-based and ownership-based sharing rules, you can create rules that suit your organization’s requirements and ensure users have the access they need to perform their jobs effectively.

 

Grant Types in Salesforce

Join the conversation

Your email address will not be published. Required fields are marked *

error: Content is protected !!