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

Thread: Custom fields don't save any data

  1. #1
    eringuet is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    13

    Default SOLVED: Custom fields don't save any data

    Hello,

    I am running SugarCRM 5.0b on debian etch. Im using PHP Version 5.2.0-8+etch10, Apache 2.2.3.

    My problem is the following:

    Admin -> studio -> account -> field -> add field

    Create a new field, text field, i called it ID and checked "audit".

    Go to account, edit an existing account, fill the ID field, save.

    The ID field is empty.

    View change log returns:
    Field it old = (null) new hello changed by admin (date).

    if I change it again is see:
    Field it old = (null) new hello changed by admin (date).
    Field it old = (null) new hello2 changed by admin (date).

    Other non-custom fields are properly saved.

    The problem is present with new account too.

    I've been reading around for hours, I can't find a way to solve the problem.

    beanfiles.html reports this (orange):

    NO! --- DynamicField is not an index in $beanFiles
    NO! --- CustomFields is not an index in $beanFiles
    NO! --- Audit is not an index in $beanFiles

    I don't know if it's pertinent.

    I've seen here that it can be an issue with strict mode in MySQL. I'm no MySQL guru but i don't seem to use strict mode on my installation (debian default).

    Code:
    mysql> SELECT @@global.sql_mode;
    +-------------------+
    | @@global.sql_mode |
    +-------------------+
    |                   |
    +-------------------+
    1 row in set (0.00 sec)
    
    mysql> SELECT @@session.sql_mode;
    +--------------------+
    | @@session.sql_mode |
    +--------------------+
    |                    |
    +--------------------+
    1 row in set (0.00 sec)
    Any help would be really appreciated,

    ER
    Last edited by eringuet; 2008-04-16 at 07:23 PM.
    Sugarcrm opensource 5.0c
    Debian etch
    Apache 2.2.3
    PHP 5.2.0-8+etch10

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Custom fields don't save any data

    Hi, ER.

    I suppose the problem is the name of the field: 'id'.
    ID is a reserved field name in sugarcrm.

    Try to change its name.

    Cheers


    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    e-mail: info@lampadaglobal.com

  3. #3
    eringuet is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    13

    Default Re: Custom fields don't save any data

    Hi André,

    I tried with other names as well.

    Sugar renames all custom fields name_c (afaik) i guess its to prevent problems.

    Can you reproduce the problem on your setup?

    Thanks,

    ER
    Sugarcrm opensource 5.0c
    Debian etch
    Apache 2.2.3
    PHP 5.2.0-8+etch10

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Custom fields don't save any data

    No, eringuet.

    This way you are making sugar conflicts your custom field id_c with the unique identifier of custom table id_c.

    You really need to rename this field.

    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    e-mail: info@lampadaglobal.com

  5. #5
    eringuet is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    13

    Default Re: Custom fields don't save any data

    Hello,

    I also have the following custom fields which do not work:

    sales_c
    support_c
    market_c
    region_c

    Is there a list of sugarcrm's own fields somewhere?

    Thank you,

    ER
    Sugarcrm opensource 5.0c
    Debian etch
    Apache 2.2.3
    PHP 5.2.0-8+etch10

  6. #6
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Custom fields don't save any data

    Quote Originally Posted by eringuet
    Hello,

    I also have the following custom fields which do not work:

    sales_c
    support_c
    market_c
    region_c

    Is there a list of sugarcrm's own fields somewhere?

    Thank you,

    ER
    Look at mySQL tables: there is one called Accounts that contains all default fields for Accounts module; a separate table named Accounts_cstm contains the user defined fields (yours).
    As soon as you add a custom field through studio to accounts module, this table is created with id_c a primary key. This id is created automatically through a php script. That is why you shouldn't use an id_c field. Try to rename that to My_Id or something, you'll see it works.
    I think this issue causes the other custom fields' bad behaviour.
    What do you think the cookie monster eats ?

  7. #7
    eringuet is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    13

    Default Re: Custom fields don't save any data

    So I screwed up my database when deleting all the custom fields i had done.

    I reinstalled everything on a new vm using this guide : http://www.howtoforge.com/debian_etch_sugarcrm

    Right after I finished the installation, I went to Admin, studio, account, fields, i created a custom field called NEW_TEST_FIELD. Sugar called it new_custom_field_c.

    I then went to layouts, I added a row to editview and listview and added the custom field.

    If I go to Accounts and i edit/add an account, the custom field is there but it won't save the text.

    ????

    thanks for the help.

    ER
    Sugarcrm opensource 5.0c
    Debian etch
    Apache 2.2.3
    PHP 5.2.0-8+etch10

  8. #8
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Custom fields don't save any data

    Quote Originally Posted by eringuet
    Right after I finished the installation, I went to Admin, studio, account, fields, i created a custom field called NEW_TEST_FIELD. Sugar called it new_custom_field_c.
    This is strange. If you create a custom field and name it NEW_TEST_FIELD, Sugar should just add the suffix _c, ie NEW_TEST_FIELD_c.
    This makes me think there stil is something not working...
    What language are you logged-in with?
    I then went to layouts, I added a row to editview and listview and added the custom field.

    If I go to Accounts and i edit/add an account, the custom field is there but it won't save the text.

    ????

    thanks for the help.

    ER
    Since you have a fresh install, I suggest you to update it to 5.0.0C.
    This patch resolves some bugs in studio.
    What do you think the cookie monster eats ?

  9. #9
    eringuet is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    13

    Default Re: Custom fields don't save any data

    Sorry my typo, it was <my name>_c.

    It's the english version and I run 5.0c now


    ER
    Sugarcrm opensource 5.0c
    Debian etch
    Apache 2.2.3
    PHP 5.2.0-8+etch10

  10. #10
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Custom fields don't save any data

    Quote Originally Posted by eringuet
    Sorry my typo, it was <my name>_c.

    It's the english version and I run 5.0c now


    ER
    Are you having the same issue now with 5.0.0C ?
    What do you think the cookie monster eats ?

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)

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. Custom Fields - no save data
    By seraph in forum Help
    Replies: 1
    Last Post: 2008-02-12, 08:17 PM
  3. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  4. Custom Fields not saving input data
    By mickster in forum Help
    Replies: 3
    Last Post: 2007-03-08, 01:50 PM
  5. Replies: 1
    Last Post: 2005-07-23, 11:28 AM

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
  •