Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Sharing Rule entry
How-to guide

How to create a Sharing Rule

Creating a Sharing Rule is one of the standard cross-team-access configurations a Salesforce admin handles regularly. The configuration is straightforward, but the testing and validation matter more than the click path because incorrect sharing leads to either security gaps or usability complaints.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 16, 2026

Creating a Sharing Rule is one of the standard cross-team-access configurations a Salesforce admin handles regularly. The configuration is straightforward, but the testing and validation matter more than the click path because incorrect sharing leads to either security gaps or usability complaints.

  1. Open Setup and navigate to Sharing Settings

    Setup > Security > Sharing Settings. The page shows Organization-Wide Defaults at the top and Sharing Rules grouped by object below.

  2. Pick the object and click New

    Scroll to the object whose Sharing Rule you want to create (Account, Opportunity, Case, custom object). Click New under the appropriate sharing rule section.

  3. Choose owner-based or criteria-based

    Owner-based rules are faster to evaluate and easier to maintain; criteria-based rules cover access patterns that ownership cannot describe. Pick the type that matches the requirement.

  4. Configure the source and target

    For owner-based rules, pick the source group (whose records get shared) and the target group (who gets access). For criteria-based rules, define the criteria (Industry = X, Region = Y, custom field = Z) and pick the target group.

  5. Set the access level

    Read Only or Read/Write. Read Only suffices for most visibility-only rules; Read/Write is needed when the target team also needs to edit records.

  6. Save and wait for recalculation

    Click Save. The platform queues a recalculation; on small orgs this completes in seconds, on large orgs it can take hours. Monitor through the Setup audit log.

  7. Test with representative users

    After recalculation completes, log in as a target-group user (or use Login As) and confirm they see the records they should and do not see records they should not.

Gotchas
  • Sharing Rules grant access only; they cannot restrict access granted elsewhere. If OWD is Public Read/Write, Sharing Rules do nothing.
  • Criteria-based sharing rules cap at 100 per object. Plan your access model so the most common patterns use owner-based rules.
  • Recalculation is asynchronous and can run for hours on large datasets. Plan rule changes for off-hours.
  • Apex Managed Sharing is needed for access patterns declarative rules cannot model. Document the logic explicitly so future admins can debug sharing complaints.

See the full Sharing Rule entry

Sharing Rule includes the definition, worked example, deep dive, related terms, and a quiz.