Announcement

Collapse
No announcement yet.

Export multiple phones and multiple e-mails

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IHAR
    replied
    Good day!
    Can you please update information about Export multiple phones and multiple e-mails. Version 8.2.4

    Leave a comment:


  • nsns
    replied
    Originally posted by espcrm View Post
    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-numbers
    From there i get the code but is not working.

    Leave a comment:


  • esforim
    replied
    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:
    Please consider adding the capability to import and export multiple email addresses and phone numbers for a single account, contact, and/or lead. For example,

    Leave a comment:


  • nsns
    started a topic Export multiple phones and multiple e-mails

    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 '';
    }

    }

    ?>
Working...
X