You need to sign in to do that
Don't have an account?
Hi guys.I'm new on salesforce. Anybody can help me to write this trigger?
1. Create a custom field on the Contact object: Is Primary Contact(checkbox)
2. Create a custom field on the Contact object: Is Primary Contact(checkbox);
3. A validation should be added so that if the Account already has a Primary Contact set a new one cannot be added;
4. When a contact is set as primary, the Primary Contact Phone should be updated to all Contacts related to the same account. This should be an asynchronous process. Make sure that if one Contact update fails, it doesn’t rollback the changes for the others.
2. Create a custom field on the Contact object: Is Primary Contact(checkbox);
3. A validation should be added so that if the Account already has a Primary Contact set a new one cannot be added;
4. When a contact is set as primary, the Primary Contact Phone should be updated to all Contacts related to the same account. This should be an asynchronous process. Make sure that if one Contact update fails, it doesn’t rollback the changes for the others.
Hi Stancioiu,
HandlerPlease try this piece of code. Hope it will help you.
Trigger
If this code helps you. Please mark this as best.
Regards,
Suraj