Announcement

Collapse
No announcement yet.

Importing Multiple Email Addresses and Phone Numbers

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

  • Importing Multiple Email Addresses and Phone Numbers

    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, importing accounts data from an uploaded csv file containing primary / secondary email addresses and office / mobile numbers for a particular account. I've tried to do this using the ["content1","content2","content3"] method recommended for importing to multiple enum fields, but that method doesn't seem to work for multiple email address or phone number fields.

    Thanks.

  • #2
    Importing mulitple Phone numbers is already implemented. Exporting phone numbers can achieved with easy customization in Record service of needed entity.

    PHP Code:

        
    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 
    '';
        } 
    You can add other phone types.

    Comment


    • Riad
      Riad commented
      Editing a comment
      Hi,
      How to that with lead in crm version 7.1.9?
      Thank you

  • #3
    Thanks. I understand now how to do the multiple phone number imports and will attempt to customize the code for the exports. What is the file path to the Record service of each entity where the additional code should go -- for example Accounts? How difficult would it be to add multiple email importing capability? For example, mapping to emailPrimary and emailSecondary categories, so you could import a primary and a secondary email address for a given entity. Thanks again.

    Comment


    • #4
      You can create service in custom dir custom/Espo/Custom/Services/Account.php

      Comment


      • #5
        Thank you. By the way, nice job on the 4.0.0 release.

        Comment


        • #6
          Originally posted by krisk View Post
          Thanks. I understand now how to do the multiple phone number imports and will attempt to customize the code for the exports. What is the file path to the Record service of each entity where the additional code should go -- for example Accounts? How difficult would it be to add multiple email importing capability? For example, mapping to emailPrimary and emailSecondary categories, so you could import a primary and a secondary email address for a given entity. Thanks again.
          Hi, can you elaborate on how you make the program import multiple email addresses? I can only manage to import one email address (the last one that I select). Or do they have to be in the same column? How do they have to be separated?
          Last edited by SpeedBullet; 05-26-2016, 03:28 PM.

          Comment


          • #7
            They must be in separate columns. Did you try to map specific phone type for columns?
            Phone (Office), Phone (Mobile)

            Comment


            • #8
              Originally posted by yurikuzn View Post
              They must be in separate columns. Did you try to map specific phone type for columns?
              Phone (Office), Phone (Mobile)
              Phones import but multiple emailaddresses don't.

              Comment


              • #9
                same problem here. I need to import different email address. Similar to the phone feature. Is that possible?

                Comment


                • #10
                  Now it's not supported.

                  Comment


                  • #11
                    Hi there, any news regarding the possibility to import multiple e-mail addresses?

                    We (Advanced Pack User) would really need this.

                    Comment


                    • #12
                      Hi, I add the php code but still not export the second phone number. Espocrm v. 7.1.9

                      Comment


                      • #13
                        Originally posted by yuri View Post
                        You can create service in custom dir custom/Espo/Custom/Services/Account.php
                        Can you brief these steps once? I am getting error 500 after adding this file. This will be a great feature for us.

                        Comment

                        Working...
                        X