---
schema_version: "1"
id: d226f0ff4d8615c32b51e19fd59d7e2f874c3ca96ae279ea558e35d66d925804
title: Defer Sharing Rule Calculations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/security_sharing_rule_recalculation.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.security_sharing_rule_recalculation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ca6b207421154358f60b3e412c9cdf1900d7ed37c24f720849a484f38c114ce8
description: If you’re making a large number of changes that affect sharing rules, including changes to sharing rules, roles, territories, or public groups, you can temporarily suspend automatic sharing rule calculations and resume them after you finish your updates. You must resume calculations and do a full sharing rule recalculation, or you can experience sharing inconsistencies in your records.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# Defer Sharing Rule Calculations

If you’re making a large number of changes that affect sharing rules, including changes to sharing rules, roles, territories, or public groups, you can temporarily suspend automatic sharing rule calculations and resume them after you finish your updates. You must resume calculations and do a full sharing rule recalculation, or you can experience sharing inconsistencies in your records.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and
              Lightning Experience</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>,
                <strong>Unlimited</strong>, and <strong>Developer</strong> Editions
              </p>
              <p style="margin-bottom:0;">See <a href="https://help.salesforce.com/s/articleView?id=platform.security_sharing_rule_considerations.htm&amp;release=264.0.0&amp;type=5" title="Review these considerations before using sharing rules.">Sharing Rule Considerations</a> for more information on availability.</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d25637e85">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d25637e85 ">To defer (suspend and resume) and recalculate sharing rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d25637e85 ">
              <p>Manage Users</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Manage Sharing Calculation Deferral</p>
            </td>

          </tr>
        </tbody>
      </table>

When you make any of these changes, sharing rules are automatically recalculated to add or remove access as necessary:

- Change an organization's default sharing model
- Create, edit, or delete sharing rules
- Create or transfer any records
- Update public group members
- Create or activate a user
- Change users’ roles or update the role hierarchy
- Add or remove users from territories
- Reparent territories
- Make changes to roles, territories, or public groups involved in sharing rules

If any of these changes affect large groups of users or related features, your updates can cause performance issues or sharing rule calculation timeouts. You can temporarily defer sharing rule calculations before you make your changes. After you finish your updates, you must resume sharing rule calculations and do a full sharing rule recalculation. Review [Considerations for Making Sharing Updates](https://help.salesforce.com/s/articleView?id=platform.security_sharing_update_considerations.htm&release=264.0.0&type=5 "Review these considerations before making sharing changes, such as updates to organization-wide defaults, sharing rules, account ownerships, or group memberships.") before deferring sharing rule calculations.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_note.png)

Note If you defer sharing rule calculations, only updates that involve sharing rules, whether directly or indirectly, are deferred, while other sharing-related changes are still processed immediately. To give a few examples, if you create sharing rules or update roles that are referenced in sharing rules, the resulting recalculations are paused. However, if you create manual shares, update teams or queues, or update roles that aren’t referenced in any sharing rules, those changes are still evaluated immediately. These calculations that can't be suspended can take significant time to process based on the org's settings and data volume.

[Group membership locking](https://developer.salesforce.com/docs/atlas.en-us.draes.meta/draes/draes_group_membership_locking.htm) can also still occur while sharing calculations are deferred.

We recommend that you resume sharing calculations immediately after making your changes, and then start the full sharing rule recalculation as soon as possible during a period of low activity. By resuming sharing calculations immediately, new updates are processed immediately, meaning there are fewer changes that must be recalculated. Completing the full sharing recalculation in a timely manner then ensures that record access behaves as expected without significant lag time.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_note.png)

Note The defer sharing calculation feature isn't enabled by default. To enable it for your organization, contact Salesforce Customer Support.

1. From Setup, in the Quick Find box, enter Defer Sharing Calculations, and then select **Defer Sharing Calculations**.
2. In the Sharing Rule Calculations related list, click **Suspend**.
3. Make changes to sharing rules, roles, territories, or public groups participating in sharing rules.
4. To enable sharing rule calculations again, click **Resume**.
5. To manually recalculate sharing rules, click **Recalculate**.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-access-264-0-0-production-enus/a92be132-3cbc-412a-9262-130636120c14/images/icon_important.png)

Important After you resume sharing rule calculations, you must click Recalculate to do a full sharing rule recalculation. Otherwise, changes that you made while calculations were suspended aren’t reflected in record access.

When sharing is recalculated, Salesforce also runs all Apex sharing recalculations.

#### See Also

- [Defer Group Membership Calculations](https://help.salesforce.com/s/articleView?id=platform.security_sharing_group_membership_calculations.htm&release=264.0.0&type=5 "If you’re making changes to groups or related features that affect many records, you can temporarily suspend automatic group membership calculations and resume them after you finish your updates. You must resume calculations and do a full sharing rule recalculation, or you can experience sharing inconsistencies in your records.")