Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Importing Opportunities

  1. #1
    JayL is offline Sugar Community Member
    Join Date
    May 2005
    Posts
    37

    Default Importing Opportunities

    I am trying to import 1 opportunity (a sample before a full import) from a custom CSV. However, I keep getting the error message "1 records skipped because they were missing one or more required fields"

    I am including the 4 starred (required) fields:
    Opportunity Name
    Exp Close Date
    Account Name
    Sales Stage
    as well as a few others including amount

    My guess is there are other critical fields - but Sugar does not star them for me so I know to import. Does anyone know if any other fields are required or how to find out why this is failing? (without having to debug their code)

    Thanks
    Version 4.2.0d

  2. #2
    pwtoday is offline Junior Member
    Join Date
    May 2006
    Posts
    4

    Default Re: Importing Opportunities

    Same challenge here!

    I have tried reformatting date fields to see if that is the error - to no avail.

    PW

  3. #3
    JayL is offline Sugar Community Member
    Join Date
    May 2005
    Posts
    37

    Default Re: Importing Opportunities

    Thanks, PW I tried changing date formats also. I've also arbitrarily tried to import other fields hoping to "hit" the lucky missing field. Since we're both having a similar problem it's likely not just me. Hopefully, someone will stumble on the "missing" field.

  4. #4
    krystalchimera is offline Junior Member
    Join Date
    Jun 2006
    Posts
    4

    Default Re: Importing Opportunities

    Hey guys...

    maybe make sure any rows from the file you are importing do not have blanks or null values in the required fields... it sounds like it may be a problem related to the data being imported... sugar can't find any data for one of the 4 fields that are required.. sometimes if the fields have Return (Enter) chars.. they are also not imported etc..

    hope this helps..
    cheers

  5. #5
    gnicholas is offline Junior Member
    Join Date
    May 2006
    Posts
    3

    Default Re: Importing Opportunities

    have exactly the same problem i thought it may have been amount and sales stage as that is starred in the add opportunity sheet have checked for null values and enter characters to no avail. i would have thought this would have caused a few records to be skipped rather than the whole import rejected.

  6. #6
    gnicholas is offline Junior Member
    Join Date
    May 2006
    Posts
    3

    Default Re: Importing Opportunities

    This has been posted as bug 6134 on 4-5-2006 and is assigned but no resolution yet.

  7. #7
    cweiss is offline Junior Member
    Join Date
    Jul 2006
    Posts
    2

    Default Re: Importing Opportunities

    Same problem here. I have been pulling (what's left of) my hair out trying to figure out why the import does not work. Glad/sad to see it is not only me.

  8. #8
    greiser is offline Member
    Join Date
    May 2006
    Posts
    6

    Default Re: Importing Opportunities

    we had a similar problem and the issue was definately the dates. My CRM user profile had dates setup as YYYY-MM-DD
    and the data we were trying to import was in the format MM-DD-YYYY and no matter what we tried, we couldn't import even though ALL required fields were there and there were no null values.

    I had a hunch and changed my date setup to MM-DD-YYYY and it imported! So I realized that Sugar wasn't changing the format correctly.

    Here is how to fix it.
    in include/TimeDate.php function swap_formats($date, $startFormat, $endFormat)

    in the first line of that function, add....
    $date = date($startFormat,strtotime($date));


    another issue about this was that the "date entered" and "date modified" were also getting screwy and would reset upon import to 1999-1-1 or something random and totally last millenium!

    So, to fix THIS, we need... date/SugarBean.php

    in function save() after the INSERT INTO mysql statement.. on line 638...
    we need to convert the dates, so after the closing bracket on 639 put...

    $this->date_entered=$timedate->swap_formats($this->date_entered,$timedate->get_date_time_format(),$timedate->get_db_date_time_format());
    $this->date_modified=$timedate->swap_formats($this->date_modified,$timedate->get_date_time_format(),$timedate->get_db_date_time_format());

    This was tested with latest OC edition of SugarCRM 4.2.1 try it out, works like a charm no matter what datetime format

  9. #9
    dbp
    dbp is offline Junior Member
    Join Date
    Aug 2006
    Posts
    1

    Default Re: Importing Opportunities

    I tried the two changes in the last post and it did not work for me. I found a quick and dirty fix but you should make sure your data is clean and contains all the required fields before attempting.

    in Modules/Import/ImportStep4.php rem out the lines as I have done below and then try the import. I strongly recommend you unrem them after you are done.

    foreach ($focus->required_fields as $field => $notused) {
    //dbp:
    //if (!isset ($focus-> $field) || $focus-> $field == '') {
    // $do_save = 0;
    // $skip_required_count ++;
    // $badline = implode("\t", $row);
    // $not_imported_str = "$badline\n";
    // $GLOBALS['log']->info("[IMPORT][NOT IMPORTED]:[".$not_imported_str."]");
    // $no_required = 1;
    // break;
    //}
    }

  10. #10
    bturc is offline Junior Member
    Join Date
    Sep 2006
    Posts
    1

    Default Re: Importing Opportunities

    I'VE CORRECTED THE PROBLEM : my list was built in excel format. I save as tab delimited (*.txt). Then I changed the format of the Date closed from date to text, then manually written the date in the date field as a text (ex: 2006-01-22)

    Then the import process wen't ok.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

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
  •