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

Thread: Custom Fields not saving Sugar 5.0.0b

  1. #1
    Danielg42 is offline Sugar Community Member
    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    187

    Default Custom Fields not saving Sugar 5.0.0b

    Hey guys!
    I've created around 30 custom fields for one module in my sugar installation. They all are properly laid out an allow you to enter information, but when I save the entry, any data in a custom field is not saved.
    The data in the original fields is fine and editable, but my custom fields are not saving. The module_cstm table in the database exists, with all the fields, but no rows with the new information are being added.

    Any ideas?
    If someone could refer me to the php file that actually does the sql query, so I could further investigate, I'd be really grateful.
    Last edited by Danielg42; 2008-03-27 at 06:29 PM.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Custom Fields not saving Sugar 5.0.0b

    Try enabling debug logging.

    Chances are that the query for saving the data is either malformed or references a field that doesn't exist. I've seen the latter occur if custom fields are added/deleted or the database is moved from one location to another.
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    Danielg42 is offline Sugar Community Member
    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    187

    Default Re: Custom Fields not saving Sugar 5.0.0b

    How would I go about enabling debug logging? I have developer mode on.. is that enough?
    Disregard... I got it now!

    Ok, so it's enabled, but I don't see anything wrong with the queries, they simply leave out any custom field data.
    The original fields are all updated, but the custom ones aren't even mentioned in the log. Any other places to check besides sugarcrm.log?
    Last edited by Danielg42; 2008-03-27 at 09:42 PM.

  4. #4
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: Custom Fields not saving Sugar 5.0.0b

    To truly dump all the queries being sent out, you'll need to enable "slow query logging" (and set the threshold to 0ms).

    To enable slow query logging, visit the Admin area (by clicking the link in the top-right corner), then click System Settings.

    Toward the bottom of the screen, you'll find a checkbox for "Log slow queries" and a textbox for "Slow query time threshold" -- check the box and enter 0 as the threshold, then save. All queries should then be dumped to sugarcrm.log. Look for the normal INSERT INTO module ... that's working-- a second INSERT INTO module_cstm should be attempted shortly thereafter.

    If all else fails, you can check the save() method in ./data/SugarBean.php.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  5. #5
    wjohnson is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    242

    Default Re: Custom Fields not saving Sugar 5.0.0b

    Quote Originally Posted by Danielg42
    How would I go about enabling debug logging? I have developer mode on.. is that enough?
    Disregard... I got it now!

    Ok, so it's enabled, but I don't see anything wrong with the queries, they simply leave out any custom field data.
    The original fields are all updated, but the custom ones aren't even mentioned in the log. Any other places to check besides sugarcrm.log?
    We had a problem like this previously and the solution was to disable strict mode in MySQL. I don't know if Sugar still doesn't work with that but it would be nice some day if they did so it could share a server with financial and other sorts of apps that require that.

  6. #6
    Join Date
    Jun 2008
    Posts
    9

    Default Re: Custom Fields not saving Sugar 5.0.0b

    Hi,
    I am having the same problem. I am using the SugarCE-Full-5.0.0e-Ja. I have created the a custom module in which i have created four custom fields
    1. Company Name(Related to Accounts).
    2. Contact Person(Related to Contacts).
    3. Date of Entry(Date).
    4. Title(Text Field).

    When I am saving these data the two relate fields are not getting saved in the table but the account_id and contact_id is getting saved. I want to save the companyname and contactperson in database so as to fetch the data in the list view.All other custom field data are being saved except the two custom 'relate' fields. Please suggest what to do.

  7. #7
    jbmdn is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    39

    Default Re: Custom Fields not saving Sugar 5.0.0b

    I think I'm having the same problem here.. 5.0.0e
    Did anyone fix it or any suggestions?

    Thanks jbmdn

  8. #8
    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 not saving Sugar 5.0.0b

    Hi, all.

    Make sure the Provide existing user can alter table in the database used by Sugar.
    Check his privileges using the phpMyAdmin.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  9. #9
    gguillote is offline Member
    Join Date
    Jun 2008
    Posts
    9

    Default Re: Custom Fields not saving Sugar 5.0.0b

    Hi,
    I've the same problem. I'm using SugaCrm CE 5.00f.
    When I try to save relate fields it doesn't save the text field related to the selected option.
    For example, there is a module called "City" and a related field in Accounts module. When I choose a city, Sugar saves the Id but not the text.
    Any suggestions?

    Thanks in advance.

  10. #10
    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 not saving Sugar 5.0.0b

    Hi all

    If you have access to the code edit the file modules/DynamicFields/DynamicFIeld.php
    Edit the function save to print in a file (or in the screen) the query for the update/insert into cstm_table.
    try to run this query in the phpMyAdmin and checks if it has any kind of error.
    This can guide you to the fix.
    Probably it is a custom field metadata issue.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

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. 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
  2. Replies: 1
    Last Post: 2006-11-24, 12:08 AM
  3. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  4. Replies: 7
    Last Post: 2006-06-06, 07:56 PM
  5. Replies: 0
    Last Post: 2005-07-25, 04:47 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
  •