Results 1 to 10 of 10

Thread: We created a new integer field i nthe opportunities module and we cannot remove it

  1. #1
    Thyssen is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default We created a new integer field i nthe opportunities module and we cannot remove it

    If we remove this field and create a "New Opportunity" any custom fields we fill in are not saved into the database! If we recreate this field it works perfectly fine everything saves correctly (SugarCRM defined fields as well as our defined fields). We are on a windows server, running SugarCRM 5.1.0a, running PHP version 5.2.5, running on SQL Server 2005.

    We've contacted Sugar Support and put a case number in and checked custom/modules/opportunities/metadata/editviewdefs.php but there is no occurrence of this field. We have also done a quick repair from the admin section of our sugar implementation.

    All we want to do is get rid of this field and avoid any issues when saving when this field is not present. Please help!!!!
    Last edited by Thyssen; 2008-10-28 at 01:14 PM.

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    It is a known bug in SugarCRM that number fields (integer, float,...) are not saved if they do not have a default value.
    So redefine your field with a default value, that it should be possible to delete it.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  3. #3
    Thyssen is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    It already does have a default value of 0 so that is not the issue.

  4. #4
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    Ok, then you should set the log level to "debug" before filling the new opportunity and then try to save.
    After that you can analyse the logifle for sql errors and their reason
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  5. #5
    Thyssen is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    Have already done this as well, and it fails on an insert on this user defined field even though the field has been deleted.
    That is the main issue...

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    ok, then you must clear you cache.
    The field is yet in a temporary panel definition.
    (search for it in /cache/modules and in /custom if you want)
    Goto to the studio, edit the editview panel, move some fields and save and deploy your changes.
    Then you should run an admin - repair job
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  7. #7
    Thyssen is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    Search for exactly WHAT????

    The cache of the browser has been cleared. I go into \Sugar\Cache\Modules\Opportunities and I have a bunch of .tpl files and the actual php files, what do you want me to do in there?

    I have done most everything and even contacted support, why is it so hard to fix this issue I dont get it ?

  8. #8
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    for WHAT??? the name of your custom field!

    I suppose you will find it in
    custom\modules\Opportunities\metadata\editviewdefs .php
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  9. #9
    Thyssen is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    38

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    As I said before this has already been checked.

    I went into this directory into the PHP and this field is NOT defined anywhere.
    I did do a repair...

    Again the issue is we created a user defined field called quote_id as integer and set a default value of 0.
    We were able to create opportunities with no issue, saving SugarCRM defined as well as user defined fields into the database no problem. Now we deleted the quote_id user defined field. Now we go in and create an opportunity and
    when we "save" that opportunity THE ONLY THING BEING SAVED is the sugarcrm defined fields, none of our user defined fields are being saved.

    So I check the log file cause i set developer debugging on, and it fails on the insert looking for the quote_id_c field (Sugar adds the _c to a user defined field). Well of course it will fail becuase that field NO LONGER EXISTS we deleted it. So I call support and they tell me to upgrade, which we did we are now running 5.1.0a. Then I call again and they tell me to do an admin repair of the database, I do same issue. They tell me to check the .php files inside of cache I did and no issues there either.

    Im running out of ideas here...

  10. #10
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: We created a new integer field i nthe opportunities module and we cannot remove it

    ok, restart thinking...

    if you create a custom field quote_id in module opportunities you will find its traces in following places:

    • database table fields_meta_data contains a row with all paramters of this new field
    • database table opportunities_cstm contains a new column quote_id_c
    • cache/modules/ModuleBuilder/Opportunityvardefs.php contains the definiton of the field in php notation
    • cache/modules/Opportunities/Opportunityvardefs.php contains the definition of the field in php notation
    • cache/modules/Opportunities/language/en_us.lang.php contains a label line for the field
    • custom/history/modules/Opportunities/metadata/editviewdefs.php_* contain different panle definition versions.
    • custom/modules/Opportunities/language/en_us.lang.php contains a label line for the field
    • custom/modules/opportunities/metadata/editviewdefs.php contains the current definition in php notation
    If you remove all these the field should be no more present.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


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
  •