Export multiple phones and multiple e-mails
Collapse
X
-
Good day!
Can you please update information about Export multiple phones and multiple e-mails. Version 8.2.4
Leave a comment:
-
From there i get the code but is not working.As far as I'm aware it is always difficult with these two field, there is another thread here (quite old though) that see to work for Phone but not email:
https://forum.espocrm.com/forum/feat...-phone-numbersLeave a comment:
-
As far as I'm aware it is always difficult with these two field, there is another thread here (quite old though) that see to work for Phone but not email:
Leave a comment:
-
Export multiple phones and multiple e-mails
Hi,
i would like to export all the phone numbers and e-mails from my accounts.
I try the following but it's not working.
<?php
namespace Espo\Custom\Services;
class Contact extends \Espo\Core\Templates\Services\Person
{
protected $exportAdditionalFieldList = ['phoneNumberOffice'];
public function loadAdditionalFieldsForExport(\Espo\ORM\Entity $entity)
{
parent::loadAdditionalFieldsForExport($entity);
$this->loadPhoneNumberField($entity);
}
protected function getFieldPhoneNumberOfficeFromEntityForExport(\Espo \ORM\Entity $entity)
{
$phoneNumberData = $entity->get('phoneNumberData');
foreach ($phoneNumberData as $d) {
if ($d->type == 'Office') {
return $d->phoneNumber;
}
}
return '';
}
}
?>Tags: None

Leave a comment: