Is it possible via code to do the following:-
1. Prevent the saving of a customer record if the customer does not have a contact associated with it?
2. For contacts associated with the specific customer, at least one of the contacts must have the primary contact role selected?
Thanks in advance