Results 1 to 3 of 3

Thread: Deleting records from sugar does not remove from table

  1. #1
    bstonehill is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    98

    Default Deleting records from sugar does not remove from table

    I needed the ability to add many identical records in one operation, so I created a popup that prompts the user to select an item as a template and a quantity and then adds that many records based on the template. The popup also creates a relationship between each of these records and an account that the user selected in the popup.

    I'm generating the record id's with an md5 hash of the microtime, an incremental value of i, and the data in the fields. Everything shows up and is editable as desired, relationships work as they should, but when I delete one of these records through sugar it permanently removes them from sugar but not from the table. None of the record's fields appear to be modified in anyway. Is there something else I need to do when creating the records to maintain integrity here?

    Oh, in case this matters, these are records for a custom module built through module builder 5.1rc.

    Please help, this is pretty much my last hurdle to get it into production.

    WinXP Pro
    SugarCRM 5.1RC
    Apache 2.0.59
    PHP 5.2.1.1
    MySQL 5.0.24?

    **EDIT**
    Even though my hashes are the same length as the ones sugar does, they are not hyphenated like sugar's are. Could this have anything to do with it? I would think there would be other problems if that were the case.
    Last edited by bstonehill; 2008-06-30 at 02:26 PM.

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Deleting records from sugar does not remove from table

    Quote Originally Posted by bstonehill
    I needed the ability to add many identical records in one operation, so I created a popup that prompts the user to select an item as a template and a quantity and then adds that many records based on the template. The popup also creates a relationship between each of these records and an account that the user selected in the popup.

    I'm generating the record id's with an md5 hash of the microtime, an incremental value of i, and the data in the fields. Everything shows up and is editable as desired, relationships work as they should, but when I delete one of these records through sugar it permanently removes them from sugar but not from the table. None of the record's fields appear to be modified in anyway. Is there something else I need to do when creating the records to maintain integrity here?

    Oh, in case this matters, these are records for a custom module built through module builder 5.1rc.

    Please help, this is pretty much my last hurdle to get it into production.

    WinXP Pro
    SugarCRM 5.1RC
    Apache 2.0.59
    PHP 5.2.1.1
    MySQL 5.0.24?

    **EDIT**
    Even though my hashes are the same length as the ones sugar does, they are not hyphenated like sugar's are. Could this have anything to do with it? I would think there would be other problems if that were the case.

    When u delete an item in sugar it does not remove it from the table - just sets deleted to 1
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  3. #3
    bstonehill is offline Sugar Community Member
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    98

    Default Re: Deleting records from sugar does not remove from table

    Quote Originally Posted by mikesolomon
    When u delete an item in sugar it does not remove it from the table - just sets deleted to 1
    Aha! You are right! Thank you! I never really paid attention to that before, I was just afraid I was setting myself up for major problems down the road.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 8
    Last Post: 2009-12-02, 04:04 PM
  2. Replies: 4
    Last Post: 2008-02-18, 10:54 PM
  3. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 PM
  4. Empty config.php at the end of install
    By aemadrid in forum Help
    Replies: 2
    Last Post: 2005-08-01, 06:29 PM
  5. 3.0c MySQL Error creating table: bugs
    By lirakis in forum Help
    Replies: 6
    Last Post: 2005-05-20, 12:27 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
  •