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:
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.
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:
Notes:
See Also:
000385648

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.