Results 1 to 6 of 6

Thread: Duplicate Contact on Account change

  1. #1
    ppolkinghorne is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    12

    Default Duplicate Contact on Account change

    OS: Fedora Core 4
    Sugar: 4.5.0h -> 4.5.1e
    Web: 2.0.54
    PHP: 5.0.4
    MySQL: 4.1.19

    We have noticed that if a Contact has the Account changed, it is duplicated. The duplicate manifests itself in both the export (to Excel for example) and in the Database if we dump (to SQL for example. In Sugar itself the duplicate is not displayed and always the most upto date Contact. The duplicate contact is an exact copy including ID apart from the Account name. Furthermore if you update the Contact, the duplicate is updated too!

    This is driving my users crazy as we use the Export function for doing mail merges and using data for other applications. I have upgraded our test system from 4.5.0h to 4.5.1e and the problem remains even with a completely new contact.

    Now both the production and test system have been steadily upgraded from 4.0, so I do not know if this is an upgrade issue or a general bug?

    Also would any of the admin repair type utilities fix this? Their descriptions are a bit vague.

    Thanks for any help.

    Peter Polkinghorne
    KSB Law LLP

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Duplicate Contact on Account change

    I have been debugging SugarCRM for a long time and I have never heard of this. SugarCRM should not be able to pick out just the most recent copy of a duplicate contact if it appears in the tables multiple times. And the ID is a unique field in the database so if you had multiple contacts in the database with the same ID it should be giving you mySQL errors all the time.

    How are you dumping your database to check for duplicates?
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    ppolkinghorne is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    12

    Default Re: Duplicate Contact on Account change

    We are using mysqldump with this command line:

    /usr/bin/mysqldump sugarcrm --complete-insert --opt --add-locks >SQLdumpfile

    Here is the initial part of the Excel dump when I export one of these records:

    c5598461-2648-48d9-3c64-4700f4f33a0a 0 01/10/2007 13:21 03/10/2007 14:45 1 83a0ea7c-8300-93e9-c074-4448e7544067 83a0ea7c-8300-93e9-c074-4448e7544067 William Gates
    c5598461-2648-48d9-3c64-4700f4f33a0a 0 01/10/2007 13:21 03/10/2007 14:45 1 83a0ea7c-8300-93e9-c074-4448e7544067 83a0ea7c-8300-93e9-c074-4448e7544067 William Gates

    As you can see 2 lines the same id.

    The id column is listed as PRIMARY KEY in database and according to MySQL this enforces uniqueness. However looking at the error log I see no complaints of duplicates. So I am baffled still. The database engine is MyISAM. So may be the problem is MySQL.

    Thanks for the response. I suppose one thing I could try is a completely fresh SugarCRM installation

    Peter Polkinghorne
    KSB Law LLP
    Last edited by ppolkinghorne; 2007-10-18 at 03:09 PM. Reason: More info

  4. #4
    ppolkinghorne is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    12

    Default Re: Duplicate Contact on Account change

    I have to apologise the problem is more subtle than I realised and less serious.

    Firstly the records I thought were duplicate in the database, were simply deleted (i.e. had deleted flag set to 1).

    So Database and Sugar are displaying data correctly.

    However on export, in particular after changing a Contacts account, I get 2 records which are identical, apart having different Accounts. Note both have deleted flag set to 0.

    So may be this a caching issue. If so is there a cache I can clear?

    This would explain why the numbers of exported records sometimes does not agree with the number selected.

    Peter Polkinghorne
    KSB Law LLP

  5. #5
    euphorium is offline Junior Member
    Join Date
    Nov 2007
    Posts
    1

    Default Re: Duplicate Contact on Account change

    Actually, I am experiencing this type of behavior right now. I have a contact that is linked to Account A. This contact is an employee that has been linked to Account A for record keeping purposes. However, the contact was interested in the products we installed in the company she is employed by and requested a unit be installed in her home. So in turn I created a new lead. Upon convertion it requested I select a pre-existing account or create a new one. So I created a new account and it asked me if I wanted to use the existing contact or create a new one. I then selected the existing contact. However, when I go to the contact list page. It shows the contact listed twice. Once with Account A listed next to it and a second time with Account B. I have a snapshot, but I don't have a way of posting it.

    Thanks in advance.

  6. #6
    Ell-N is offline Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default Re: Duplicate Contact on Account change

    I understand this thread is quite old, but the problem is still relevant to me. I am running a free version, 6.1.2 and when exporting contacts for a mail merge, any contact who's company has been changed, all the contact details are correctly changed, but the company name field still shows as their ex-company, but in the actual database the company name is fine.
    Any resolution/way to fix?

    Thanks for reading

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 16
    Last Post: 2010-10-06, 07:59 PM
  2. Import contact on existing account
    By esolarc in forum Developer Help
    Replies: 1
    Last Post: 2006-03-22, 01:21 PM
  3. Creating a new contact & account
    By ra42 in forum Help
    Replies: 2
    Last Post: 2005-11-20, 11:06 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
  •