You need to sign in to do that
Don't have an account?
larva
apex class code with trigger
Account related to the updated Contact does not yet have a Primary Contact. I can create a lot of contact as long as there are no existing primary contact.
When an existing Non-Primary Contact is updated to become a Primary Contact
If the Account already has a Primary Contact it will display error.
When an existing Non-Primary Contact is updated to become a Primary Contact
If the Account already has a Primary Contact it will display error.
Try Below Trigger Please Mark It As Best Answer If It Helps
Thank You!