I believe this area is one of the most re-implemented and more error prone aspects of espocrm entity management. It would greatly improve productivity to already have these helper methods properly implemented in core. For example:
Code:
function addPhoneNumber($entity, $number, $primary, $invalid, $optout): bool function removePhoneNumber($entity, $number): bool function setPrimaryPhoneNumber($entity, $number): bool function addEmailAddress($entity, $address, $primary, $invalid, $optout): bool function removeEmailAddress($entity, $number): bool function setPrimaryEmailAddress($entity, $number): bool
Comment