Loading

Error 'Group Membership Locked' when updating group membership

Publiceringsdatum: Aug 21, 2024
Beskrivning

Error: "Group Membership Locked. The operation you requested affects group membership. This operation can't be processed right now, because it interferes with another operation already in progress. Please try again later."

Why this happens:

The Sharing capabilities of Salesforce give administrators flexibility in modeling their organization and sharing information between different groups of people. Administrators can define a role hierarchy, create public groups, establish queues for work teams, and organize sales operations with territory management. Accurately maintaining the membership of all these groups is crucial, as mistakes could lead to exposure of sensitive information to the wrong people. So Salesforce uses various kinds of database locks to ensure that updates to group membership don’t interfere with each other or introduce incorrect data in the sharing system.

Changes that can initiate these locks include:

  • Changes to the role hierarchy
  • Role create/edit/change
  • Role assignment or reassignment
  • Changes to the sharing model
  • Mass reassignment of Account/Sales Teams
  • Territory create/edit/change
  • User create/edit/change
  • Portal account ownership updates 


While these locks protect the integrity of customers’ security configuration, they can also generate error messages for large organizations trying to perform multiple updates at the same time. These errors, called 'lock errors,' indicate that an update was 'locked out' because a previous update already locked the table that maintains group membership, and is still running.

Lösning

This error is in place by design and the best workaround is to wait a while before trying any changes again. Salesforce will only enforce these locks while updates are in progress.

For organizations with a lot of data and a very large number of roles and public groups, and/or have ownership data skews the probability of obtaining these locks is greater and updates can take longer to process. For organizations that fall into either of these categories, the following is recommended:

  • Avoid data skews if at all possible. If unavoidable, review Ownership Data Skews documentation above for best practices.
  • Test changes in a recently refreshed full-copy Sandbox first.
  • When making changes in production environment utilize Defer Sharing Calculations.
  • Make changes during a maintenance window/off-peak hours. This includes resuming and recalculating sharing (if using Defer Sharing).


Notes: 

  • A similar error received is "Group membership operation already in progress" when mass updating account owner field. The best practice is to wait for the operation to be completed.
  • If there are no operations currently running that should collide, and these errors are still occurring, please contact Salesforce Support. Operations can be checked via:
    • Setup Audit Trail
    • Background Jobs

 

See Also:

Knowledge-artikelnummer

000385648

 
Laddar
Salesforce Help | Article