You are here:
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
| Available in: both Salesforce Classic and Lightning Experience |
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions See Sharing Rule Considerations for more information on availability. |
| User Permissions Needed | |
|---|---|
| To defer (suspend and resume) and recalculate sharing rules: | Manage Users AND Manage Sharing Calculation Deferral |
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 before deferring sharing rule calculations.
Group membership locking 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.
- From Setup, in the Quick Find box, enter Defer Sharing Calculations, and then select Defer Sharing Calculations.
- In the Sharing Rule Calculations related list, click Suspend.
- Make changes to sharing rules, roles, territories, or public groups participating in sharing rules.
- To enable sharing rule calculations again, click Resume.
- To manually recalculate sharing rules, click Recalculate.
When sharing is recalculated, Salesforce also runs all Apex sharing recalculations.

