Results 1 to 9 of 9

Thread: CSV Import

  1. #1
    readm is offline Junior Member
    Join Date
    Aug 2011
    Posts
    6

    Default CSV Import

    Hi guys,

    We have a lot of new data (Accounts and Contacts) in a csv file, and now we wanna import it into SugarCRM. We are using Version 5.2.0d (Build 5604).

    For the start I used a small test file with 4 lines (header + 3 companies), but the import stops - at the last step i guess.

    At the last step (every header assianged to an DB table) SugarCRM says:

    Code:
    8] Array to string conversion on line 231 in file ...\sugarcrm\modules\Import\ImportFile.php

    What's the problem here? Do you need the file (anonymized of course) for a test?


    I would appreciate any kind of help...

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: CSV Import

    Which fields did you map together? The message looks as if there is a type conflict between the field in the file and the result field in the sugar module.
    An example how your csv file rows look like could be helpful to see where the problem is.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  3. #3
    readm is offline Junior Member
    Join Date
    Aug 2011
    Posts
    6

    Default Re: CSV Import

    Hi,

    thanks for your reply.

    The employee who works with SugarCRM isn't here today, but i know that the DB tabels were assianged "logically" - you'll see what i mean, when you look through my csv template.

    Thanks!
    Attached Files Attached Files

  4. #4
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: CSV Import

    I did a successful test import with your csv file. I mapped several fields from the file to accounts fields. Since I have no 5.x installation I used 6.2.

    The csv file looks good. So I think there must be a problem with the mapping of the fields. To see which mapping is critical you could check
    1) is there an additional info available for the error message (e.g. name of the problematic field) ? (Messages in sugarcrm.log?, browser error messages, etc.)
    2) You could do some test imports, starting with simply mapping the account name, if this works take more fields and map them, etrc. until you see which field causes the problem.

    If the problematic field is known then you could have a look onto the field type (definition in admin->Studio). From the error message I'd say that there is a problem during mapping the text from the column of the csv file to the accounts field's type.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  5. #5
    readm is offline Junior Member
    Join Date
    Aug 2011
    Posts
    6

    Default Re: CSV Import

    Thanks for your reply again.

    If the problematic field is known then you could have a look onto the field type (definition in admin->Studio). From the error message I'd say that there is a problem during mapping the text from the column of the csv file to the accounts field's type.
    Well, the admin isn't here for two weeks, but we have a suspect field, "Name". It is always shown in red and is has a mark (Name *). The field is required i think, and therefore we couldn't get any further.
    Do you have any suggestion, or do we need to wait for the admin, so that we can look on the field type? I mean there are already around 4200 accounts in the DB, so this is a bit strange.

  6. #6
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: CSV Import

    Yes, all red marked fields are required fields. In accounts module this is only the field 'name' which is the name of the account. In your csv file there is the first column called "company name". I think this will be a good choice to take this as the account's name. (You could have a look into your import file first and check if the values in that first column are ok and if they are similar to the data that actually is in your accounts module.)

    At the end of the import Sugar shows you a list of all data sets imported from the file. You can go through that list to see if everything is ok. If not you have the option to cancel the import (all that new data will be removed from the database in that case) and start again.

    If you have a test system running it would be a good idea to test the import in that environment first and then do it in the production. Otherwise you should test with an import file with only a few records.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  7. #7
    readm is offline Junior Member
    Join Date
    Aug 2011
    Posts
    6

    Default Re: CSV Import

    Again, thanks for your reply.

    Quote Originally Posted by sts View Post
    Yes, all red marked fields are required fields. In accounts module this is only the field 'name' which is the name of the account. In your csv file there is the first column called "company name". I think this will be a good choice to take this as the account's name.
    Yes, that's exactly what we do, we are assianing the column 'account_name' to the DB field 'Name'.

    Quote Originally Posted by sts View Post
    2) You could do some test imports, starting with simply mapping the account name, if this works take more fields and map them, etrc. until you see which field causes the problem.
    We will do that now, because i was thinking "oh, Name is painted red => error" - now i know that SugarCRM shows required fields that way. Thanks.

    I will report about the process in the next days..

  8. #8
    readm is offline Junior Member
    Join Date
    Aug 2011
    Posts
    6

    Default Re: CSV Import

    Quote Originally Posted by readm View Post
    I will report about the process in the next days..
    Hi again,

    Importing accounts is working fine now, we removed the two fields that were causing problems, they weren't necessary anyway.

    Now, we are moving on to importing contacts. All fields are assianged automatically, and when starting the import, SugarCRM just shows a blank error message with the 'OK' button.
    The interesting thing is that the contacts (3 in the testfile we used) are all created in the DB. Everythings there, but the error message gives it a bad aftertaste.

    I attached a test file for testing.


    Good afternoon and thanks in advance!
    Attached Files Attached Files

  9. #9
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: CSV Import

    I did a test import with my 6.2 installation without problems and without an error message.

    For one field I had to remove the automatical mapping (salutation) because the file contained a value "Herr" that my installation does not know (only "Mr", "Mrs", ...). This kind of mapping Sugar does not support.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. import module - import leads with error fields also
    By dsuvankar in forum Developer Help
    Replies: 0
    Last Post: 2010-06-28, 03:46 PM
  2. Replies: 4
    Last Post: 2009-08-05, 08:14 PM
  3. Replies: 2
    Last Post: 2009-03-14, 08:34 PM
  4. Replies: 1
    Last Post: 2005-06-30, 07:02 AM
  5. Replies: 0
    Last Post: 2005-06-29, 10:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •