You need to sign in to do that
Don't have an account?

Trigger to uncheck primary checkbox for multiple contacts
Hi,
The Primary checbox field on our Contacts is enabled to "Checked" by default. If we want to add more contacts under the same account, then this should no longer be checked if it already has a primary contact. How can this be done using a trigger?
Thanks
The Primary checbox field on our Contacts is enabled to "Checked" by default. If we want to add more contacts under the same account, then this should no longer be checked if it already has a primary contact. How can this be done using a trigger?
Thanks
1. Query all contacts related to account of current contact.
2. Check if any of these is primary one
You might have to consider few senarios like what happens when primary contact is deleted etc.
Thanks,
N.J