function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vidya H 4Vidya H 4 

Need to Update the Primary Contact's Name on a custom Field in Account, and User should not be able to delete the Primary Contact.

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Vidya,

How do you identify the contact is primary or not. Do you have any field on contact object to check if the contact is primary.

Thanks,
 
Vidya H 4Vidya H 4

@Sai Praveen   for example - if Account has 3 related contacts such as contact a, contact b and Primary contact.
The contact with name primary contact should not be deleted by any user. Remaning contacts can be deleted.