Announcement

Collapse
No announcement yet.

Import problem with emailAddress field

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

  • Import problem with emailAddress field

    Hello,

    we've got a problem importing account data in our Espo.
    Everytime we map the email address field and try to import, Espo says "import running" but nothing happens. If we not map email address, everything works fine.
    The attached CSV is created by exporting a test account, so the data format should be absolutly clean.
    Importing the CSV in a clean Espo installation works like a charm, but not in our customers Espo.
    Does anyone has a hint where we can start debugging it?
    We use Espo 5.1.2

    Click image for larger version

Name:	1.PNG
Views:	324
Size:	57.3 KB
ID:	37748 Click image for larger version

Name:	2.PNG
Views:	301
Size:	28.3 KB
ID:	37749 Click image for larger version

Name:	3.PNG
Views:	338
Size:	22.8 KB
ID:	37747 Export_Account.zip

    Best regards,

    Daniel

  • #2
    On the demo it works as well.
    Does your your customer customize the code?

    Comment


    • #3
      Originally posted by tanya View Post
      On the demo it works as well.
      Does your your customer customize the code?
      Yes, there are several customizations, but I don't have an approach where I could start debugging it. Maybe there is a known code-place that could cause something like that?

      Comment


      • #4
        Check step by step:
        1) Open browser log - is there any error while importing
        2) EspoCRM log - data/logs
        3) server error log
        4) Check active Workflow related to Account and Business Processes, if your customet has Advanced Pack
        5) check Account Formula in Entity Manager
        6) try to create Account with the same data as in test csv

        If still nothing, create a copy of customer instance for digging and after work with it
        7) remove content is custom/Espo/Custom, rebuild crm in Administartion. Refresh the page.
        8) try to import again. If everything is ok - the problem is with upgrade safe customiation. It's not hard to find the reason. If the problem is still here - core files were changed.... not so easy to find the reason

        Comment


        • #5
          Hi Tanya,

          problem found, but not a solution :-/

          There is a hook for accounts in "custom\Espo\Custom\Hooks\Account\Accounting.p hp", and there is following piece of code:

          Code:
          public function afterRelate(Entity $entity, array $options = array(), array $data = array()) {
                  $this->getEntityManager()->saveEntity($entity);
          }
          After disabling it, the import works as a charm. For importing, disabling it would be a workaround I think because there is no relation while importing, or do you think this function is important for the import?

          Best, Daniel

          Comment


          • #6
            Any relation runs all beforeSave and afterSave hooks (entity and common (stream, notification, etc.))
            Do you really need this? It could make CRM slower.

            Check at least needed relation. (application/Espo/Hooks/Common/Stream.php)

            Comment


            • #7
              Originally posted by tanya View Post
              Do you really need this? It could make CRM slower.
              Don't think so and can't see any problems after disabling it. Thanks Tanya!

              Comment

              Working...
              X