Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Trouble importing new targets with custom fields

  1. #1
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Trouble importing new targets with custom fields

    I have created custom fields and added them to the 'detail' and 'edit' views of Targets. I have mapped the cvs file fields to the Sugar fields -- some standard and some custom -- following the import process. The problem is that the standard fields import as expected, but the custom fields do not import at all. Looking at the 'prospects' and 'prospects_cstm' tables in MySQL I can see that the 'prospects_cstm' is empty.

    What am I missing in Sugar's import process??

  2. #2
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Trouble importing new targets with custom fields

    Hi tawaki, I've forwarded this on to QA for a quick test on our systems.

    What Sugar version are you using?

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  3. #3
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Re: Trouble importing new targets with custom fields

    Hello Andy,

    I am using the latest open source version "d" on a Mandriva box with Apache 2.2.4, PHP 5.2.1, and MySQL 5.0.37.

    I created 8 additional custom fields. I kept the csv file small, under 1 MB with 500 records. The import finished okay with all 500 records importing to the 'prospects' table -- it did not hang -- so I doubt that I am having a file size issue.

    Thanks for the help.

  4. #4
    franklin_sugar is offline Sugar Team Member
    Join Date
    Jun 2006
    Posts
    157

    Default Re: Trouble importing new targets with custom fields

    Hi Tawaki,

    This is Franklin from Sugar QA team. When you importing, did you map your custom fields to the database fields at step3? What are the data types of your custom fields?

    FYI: I repeated what you did, but with fewer custom fields and records. It imports correctly into the "prospects_cstm" table.

    Thanks,
    Franklin

  5. #5
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Re: Trouble importing new targets with custom fields

    Hello Franklin,

    Yes I did map them. Data types are 3 dates, 3 texts and 2 integers. I just tried importing 10 records with only one text type custom field and it worked. I am going to experiment with the date and integer types.

    Do I need to format the date or maybe the number fields in some particular way in the csv file? Any hints to save me time would be appreciated greatly.

  6. #6
    mkenigson is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Nashville, TN
    Posts
    83

    Default Re: Trouble importing new targets with custom fields

    I'm having a similar problem. I can't seem to use the Accounts importer to import custom date fields. What format do the dates need to be in? I've tried standard datetime formats, yyyy-mm-dd, and mm/dd/yyyy. No dice so far. Everything that has a value gets imported as 2000-01-01.

    Incidentally, I also discovered that if you use the "Undo Last Import" button, it won't get rid of anything it's put into accounts_cstm. Don't know if it's got that issue with opportunities or any other imports.

  7. #7
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Re: Trouble importing new targets with custom fields

    Quote Originally Posted by tawaki
    Hello Franklin,

    Yes I did map them. Data types are 3 dates, 3 texts and 2 integers. I just tried importing 10 records with only one text type custom field and it worked. I am going to experiment with the date and integer types.

    Do I need to format the date or maybe the number fields in some particular way in the csv file? Any hints to save me time would be appreciated greatly.
    Okay, I am now getting all custom fields to import, but like mkenigson noted, the date field is messed up. What is the necessary date format?

  8. #8
    franklin_sugar is offline Sugar Team Member
    Join Date
    Jun 2006
    Posts
    157

    Default Re: Trouble importing new targets with custom fields

    Hi,

    The date format is specified in "My Account". The default is yyyy-mm-dd hh:mm. The date in the csv file has to match the format in "My Account".

    Thanks,
    Franklin

  9. #9
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Re: Trouble importing new targets with custom fields

    Okay, yyyy-mm-dd works, but it brings up another question. During the installation process, one of the pages asked for preferred formating. For example, I chose a date format of mm-dd-yyyy. I just checked the config.php file and it is that. However, the format displayed in all date fields in my Sugar app is yyyy-mm-dd. Do I have a problem with my config.php file?

    The associated question is should the date format used in the imported date fields match the configured date format or should it always be yyyy-mm-dd...or can it be any of the date formats listed in the array in config.php?

  10. #10
    tawaki is offline Member
    Join Date
    May 2007
    Posts
    7

    Default Re: Trouble importing new targets with custom fields

    Quote Originally Posted by franklin_sugar
    Hi,

    The date format is specified in "My Account". The default is yyyy-mm-dd hh:mm. The date in the csv file has to match the format in "My Account".

    Thanks,
    Franklin
    Got it! It all makes sense now.

    Thanks for the help.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Saving and updating custom fields data
    By jones70 in forum Developer Help
    Replies: 2
    Last Post: 2011-10-05, 06:10 AM
  2. Replies: 3
    Last Post: 2008-01-08, 02:45 AM
  3. Replies: 0
    Last Post: 2006-12-20, 11:39 PM
  4. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  5. Replies: 7
    Last Post: 2006-06-06, 07:56 PM

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
  •