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

Thread: Duplicates hook for Accounts

  1. #1
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Duplicates hook for Accounts

    Hi there! Is there a way for me to disable the duplicate check for accounts and contacts? Please advise. Thank you very much!

    Cheers!

  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: Duplicates hook for Accounts

    Hi Monica

    You need to edit the custom/modules/Accounts/metadata/editviewdefs.php and add the hidden attribute into form attribute.
    Have a look into modules/Calls/metadata/editviewdefs.php
    Add a hidden field called "dup_checked" with value 'true'.

    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.

  3. #3
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Re: Duplicates hook for Accounts

    Thank you so much Andre!
    I added it but now I am getting a blank form when I go to save the Accounts record. Any idea? Thank you again.

    $viewdefs ['Accounts'] = array (
    'EditView' =>
    array (
    'templateMeta' =>
    array (
    'maxColumns' => '2',
    'form' => array('hidden'=>array(
    '<input type= "hidden" name="dup_checked" value= "true">'),
    'buttons' =>
    array (
    0 => 'SAVE',
    1 => 'CANCEL',
    ),
    ),

  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: Duplicates hook for Accounts

    Check the tail of sugarcrm.log at the root of your SugarCRM system and also the error_log of apache.
    Hopefully there are some error messages regarding that 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.

  5. #5
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Re: Duplicates hook for Accounts

    Both logs do not have any errors being reported. Is there any other file that needs to be edited?

    I have been trying to figure this out for the last 3 days and it's driving me crazy

  6. #6
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Duplicates hook for Accounts

    Quote Originally Posted by andopes View Post
    Hi Monica

    You need to edit the custom/modules/Accounts/metadata/editviewdefs.php and add the hidden attribute into form attribute.
    Have a look into modules/Calls/metadata/editviewdefs.php
    Add a hidden field called "dup_checked" with value 'true'.

    Cheers
    I tried doing this as well. I'm working the Contacts edit view and everything appears to run properly, but when I try to save a contact it just saves a blank record - it doesn't include any of the information I've entered. I'm terrible at php so I'm guessing I just goofed up the code somewhere. Here is all I added to custom/modules/Contacts/metadata/editviewdefs.php:
    PHP Code:
    => '<input type="hidden" name="dup_checked" value=true>'
    I checked both of the error logs and there is nothing there. Any suggestions?

    jcb23

  7. #7
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Re: Duplicates hook for Accounts

    Hi jcb23!
    After playing with this forever, I found a different route to make this work...

    If you go to ContactFormBase file, find the following line (around line 567) and just comment out the one line:

    if (empty($_POST['record']) && empty($_POST['dup_checked'])) {

    //$duplicateContacts = $this->checkForDuplicates($prefix);

    And that is it Hope this helps.

  8. #8
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Duplicates hook for Accounts

    Quote Originally Posted by monicaDC View Post
    Hi jcb23!
    After playing with this forever, I found a different route to make this work...

    If you go to ContactFormBase file, find the following line (around line 567) and just comment out the one line:

    if (empty($_POST['record']) && empty($_POST['dup_checked'])) {

    //$duplicateContacts = $this->checkForDuplicates($prefix);

    And that is it Hope this helps.

    That works beautifully! Thank you sooo much!

  9. #9
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Duplicates hook for Accounts

    I'm done talking about core hacks, I'm tired of it. Here is the info you need:

    http://www.sugarcrm.com/wiki/index.p...uplicate_Merge
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  10. #10
    monicaDC is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    175

    Default Re: Duplicates hook for Accounts

    Quote Originally Posted by SugarDev.net View Post
    I'm done talking about core hacks, I'm tired of it. Here is the info you need:

    http://www.sugarcrm.com/wiki/index.p...uplicate_Merge
    I could very well be completely wrong here since I am no expert but I believe this addresses the duplicate merge only and not the alert you get when you create and save a new record.

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. Replies: 0
    Last Post: 2008-08-31, 07:03 AM
  2. Replies: 0
    Last Post: 2008-05-04, 10:22 PM
  3. Eliminate Duplicates (in contacts, accounts, etc.)
    By hheckner in forum Feature Requests
    Replies: 1
    Last Post: 2006-07-08, 03:39 PM
  4. Duplicates when importing accounts
    By wyred in forum General Discussion
    Replies: 0
    Last Post: 2005-09-13, 06:56 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
  •