You need to sign in to do that
Don't have an account?
duub
Auto Add User to a Collaboration Group Member Object - issue with Duplicate error
Hi.
I have an issue with the Collaboration Group Member object, if I try and add an Already existing member to a group that they are in, I get a duplicate error:
caused by: System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>: []
1. Is there a simple solution for this? Why can't it ignore the insert, I could do a try catch, but this is part of a bulk insert or update.
The solution would be to loop through the list of members that are being added to the group and if they don't already exist then simply add them to a new list that you insert.