You need to sign in to do that
Don't have an account?
NinoJose
UNKNOWN_EXCEPTION, group membership operation already in progress
Hi All,
I have an future method that inserts/updates user. However during checking on Setup->Monitoring->Apex Jobs I found out that there are some instances that I get the an error 'First error: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, group membership operation already in progress:'
I'm not sure about the error since it was not meaningful to me. Can somebody shed some light regarding this issue? I have tried search for other thread but none to avail.
Regards
In my opinion, this error comes when either you create a group or add a group member through trigger and you trigger works on user after insert. It seems that you are trying to update a field after inserting the user.
Thanks Pradeep. However, the I'm not updating a user rather creating a new user. A have a trigger on Contact Trigger that creates Partner User upon some validation. I can't seem to replicate this issue as it was intermitent. :-(
The reason might the same record trying to update in the same request context. I had same problem during the contact merge while updating the record before doing the Merge.
During the sharing calculation a lock is taken to ensure data integrity, so some administrative operation are not available (change user role, create/move/delete a role or a territory, ... ).
2 solutions: