Export multiple phones and multiple e-mails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nsns
    Junior Member
    • Jun 2019
    • 20

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

    }

    ?>
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    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,

    Comment

    • nsns
      Junior Member
      • Jun 2019
      • 20

      #3
      Originally posted by espcrm
      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.

      Comment

      • IHAR
        Junior Member
        • Feb 2024
        • 2

        #4
        Good day!
        Can you please update information about Export multiple phones and multiple e-mails. Version 8.2.4

        Comment

        • Ashif Malayil
          Senior Member
          • Dec 2023
          • 171

          #5
          IHAR nsns Did you got any resolution for this?

          Comment

          Working...