Sharing Rules in Salesforce are declarative tools that allow administrators to extend access to records beyond what is defined by the Organization-Wide Defaults (OWD). When OWD settings are restrictive (Private or Public Read Only), Sharing Rules provide a mechanism to grant additional access to sp…Sharing Rules in Salesforce are declarative tools that allow administrators to extend access to records beyond what is defined by the Organization-Wide Defaults (OWD). When OWD settings are restrictive (Private or Public Read Only), Sharing Rules provide a mechanism to grant additional access to specific groups of users based on record ownership or field criteria.
There are two primary types of Sharing Rules:
1. **Owner-Based Sharing Rules**: These rules share records owned by members of a specific public group, role, or role and subordinates with another group. For example, you can share all Opportunities owned by the Sales Team role with the Marketing Team role.
2. **Criteria-Based Sharing Rules**: These rules share records that match specific field values. For instance, you might share all Accounts where the Industry field equals 'Healthcare' with a particular public group.
Sharing Rules can grant two levels of access:
- **Read Only**: Users can view records but cannot edit them
- **Read/Write**: Users can both view and modify the shared records
Key considerations when implementing Sharing Rules include:
- Sharing Rules can only open up access; they cannot restrict access below OWD settings
- They apply to existing and future records that meet the criteria
- Changes to Sharing Rules may require recalculation of sharing, which can take time for large data volumes
- Sharing Rules are evaluated when records are created or modified
Sharing Rules work alongside other sharing mechanisms including Role Hierarchy, Manual Sharing, Apex Managed Sharing, and Team Sharing to create a comprehensive record access model.
Best practices include using public groups as the target for Sharing Rules rather than individual roles, as this provides more flexibility and easier maintenance. Additionally, administrators should regularly audit Sharing Rules to ensure they align with current business requirements and security policies.
Sharing Rules in Salesforce: A Comprehensive Guide
Why Sharing Rules Are Important
Sharing Rules are a fundamental component of Salesforce's security model. They extend record access beyond what Organization-Wide Defaults (OWD) provide, allowing administrators to grant additional access to specific groups of users. Understanding Sharing Rules is critical for the Salesforce Administrator exam as they represent a key mechanism for balancing security with collaboration needs.
What Are Sharing Rules?
Sharing Rules are automated rules that grant additional record access to users based on record ownership or other criteria. They can only open up access – they cannot restrict access that has already been granted through OWD or other sharing mechanisms.
There are two types of Sharing Rules:
1. Owner-Based Sharing Rules - Share records owned by certain users (defined by role, role and subordinates, or public groups) with other users
2. Criteria-Based Sharing Rules - Share records that meet specific field criteria with designated users, regardless of who owns the record
How Sharing Rules Work
Sharing Rules operate within Salesforce's sharing hierarchy:
1. OWD sets the baseline - This is the most restrictive level of access for each object
2. Role Hierarchy opens access upward - Managers can access subordinates' records (unless disabled)
3. Sharing Rules extend access horizontally - Grant access to users who wouldn't otherwise have it through the hierarchy
When creating a Sharing Rule, you specify: - Which records to share (by owner or criteria) - With whom to share (roles, public groups, territories) - What level of access to grant (Read Only or Read/Write)
Key Characteristics of Sharing Rules:
- Apply to existing and future records - Are evaluated when records are created or modified - Cannot grant access higher than what's allowed by the OWD for related objects - Support both standard and custom objects - Criteria-based rules support specific field types (not all field types are supported)
Common Use Cases
- Sales teams in different regions need to collaborate on shared accounts - Service representatives need access to cases marked as 'Escalated' - Finance team needs Read access to all opportunities above a certain amount - Cross-functional project teams need access to specific records
Exam Tips: Answering Questions on Sharing Rules
Tip 1: Remember the Baseline Sharing Rules only make sense when OWD is set to Private or Public Read Only. If OWD is Public Read/Write, there's no need for Sharing Rules as everyone already has full access.
Tip 2: Know What Sharing Rules Cannot Do They cannot restrict access – they only extend it. If a question asks about limiting access, Sharing Rules are not the answer.
Tip 3: Understand the Two Types Owner-based rules share based on who owns the record. Criteria-based rules share based on field values. Know when to use each type.
Tip 4: Public Groups Are Key Sharing Rules often work with Public Groups. If a question mentions needing to share with a specific combination of users, think Public Groups plus Sharing Rules.
Tip 5: Criteria-Based Limitations Not all field types work with criteria-based sharing rules. Formula fields, lookup fields, and certain other field types are not supported.
Tip 6: Access Levels Sharing Rules can grant Read Only or Read/Write access. They cannot grant additional permissions like Delete or Transfer ownership.
Tip 7: Processing Time When Sharing Rules are created or modified, there may be a recalculation period. For exam purposes, know that changes to sharing rules can affect system performance temporarily.
Tip 8: Look for Keywords Exam questions mentioning 'horizontal access,' 'peer-to-peer sharing,' or 'extending access based on field values' often point to Sharing Rules as the correct answer.
Practice Scenario
If a question states: 'Sales reps in the West region need Read/Write access to all Opportunities with a Stage of Negotiation, regardless of ownership' – the answer involves a Criteria-Based Sharing Rule on the Opportunity object.