You need to sign in to do that
Don't have an account?
cmchambe
Custom field to trigger Public Group member
We have created a custom field in the User record which is a checkbox to tell us if someone is a people manager or not. I'd like to automatically add all people managers to a Public Group. Any tips? Thanks!
you will need to write a afterInsert trigger on User, if the custom field is true, perform below:
1. create a GroupMember
2. set GroupId = to the public group Id you required
3. set UserOrGroupId to the user id that you are creating
4. insert the new GroupMember record into database