How to add custom field in Find Duplicates Section of the Module

Hi Guys,

Hope all of you are doing good.

Actually I have a one issue. is that, when we open up any module record like Leads Record, then there are options are giving like Edit, Duplicates, Delete, Find Duplicates and etc.

Now when I click on Find Duplicate Option, it is giving some options like Office Phone, Home Phone etc. Now I need to add some other fields like First Name, Last Name and some other custom fields. So can anyone help me and tell me how to do this task. How to add more fields in Find Duplicate Section to find duplicates.

I will be thankful to you.

Any Help Will be Appreciated.

Thanks

  • Hi Muhammad Rizwan,

    Copy the file from modules/Leads/clients/base/views/dupecheck-list/dupecheck-list.php to custom/Extension/modules/Leads/Ext/clients/base/views/dupecheck-list/dupecheck-list.php.

    Add manually your custom field array in this file. For eg. custom_field_c is your field means,

    <?php

    $viewdefs['Leads']['base']['view']['dupecheck-list'] = array(

        'panels' => array(

            array(

                'name' => 'panel_header',

                'label' => 'LBL_PANEL_1',

                'fields' => array(

                    array(

                        'name' => 'full_name',

                        'type' => 'fullname',

                        'fields' => array(

                            'salutation',

                            'first_name',

                            'last_name',

                        ),

                        'link' => true,

                        'css_class' => 'full-name',

                        'label' => 'LBL_LIST_NAME',

                        'enabled' => true,

                        'default' => true,

                    ),

                    array(

                        'name' => 'status',

                        'label' => 'LBL_LIST_STATUS',

                        'enabled' => true,

                        'default' => true,

                    ),

                    array(

                        'name' => 'account_name',

                        'label' => 'LBL_LIST_ACCOUNT_NAME',

                        'enabled' => true,

                        'default' => true,

                        'related_fields' => array(

                            'account_id',

                            'converted',

                        ),

                    ),

                    array(

                        'name' => 'phone_work',

                        'label' => 'LBL_LIST_PHONE',

                        'enabled' => true,

                        'default' => true,

                    ),

                    array(

                        'name' => 'email',

                        'label' => 'LBL_LIST_EMAIL_ADDRESS',

                        'enabled' => true,

                        'default' => false,

                    ),

                    array(

                        'name' => 'assigned_user_name',

                        'label' => 'LBL_LIST_ASSIGNED_USER',

                        'enabled' => true,

                        'default' => false,

                    ),

                    array(

                        'name' => 'date_entered',

                        'label' => 'LBL_DATE_ENTERED',

                        'enabled' => true,

                        'default' => false,

                        'readonly' => true,

                    ),

                    array (

                    'name' => 'custom_field_c',

                    'label' => 'LBL_CUSTOM_FIELD',

                    'enabled' => true,

                        'default' => true,

                  ),

                ),

            ),

        ),

    );

    After give Quick Repair and Rebuild.

    Hope this will helps.

    Thanks !

  • Hi Vignesh V.

    Thank you so much for your given answer, but actually there is a little problem.

    Problem is that, I did not have such file dupecheck-list.php in both given Path, Second I did not your suggested path in my project.

    I did not have "modules/Leads/clients/base/views/dupecheck-list/dupecheck-list.php" file Path as well as  "custom/Extension/modules/Leads/Ext/clients/base/views/dupecheck-list/dupecheck-list.php" this file Path.

    So what I will do ??

    Thanks.

  • Hi Muhammad Rizwan,

    Which Sugar Version, Edtion you are using ?

  • Hi,

    I am using SugarCRM Community Edition i.e SugarCE-6.5.17 .

  • Hi,

    I checked in Sugar Enterprise Edition. I didn't checked in Community Edition

    Thanks.

  • Hi,

    Go to custom/Extension/modules/Leads/Ext/Vardefs/

    Here you can see custom fields created in Leads module. If you want to add in find duplicates means, add this line in the custom field folder.

    for eg.

    my custom field is custom_c, so inside sugarfield_custom_c.php, add this line:

    $dictionary['Lead']['fields']['custom_c']['merge_filter']='enabled';

    The overall file is

    <?php

    $dictionary['Lead']['fields']['custom_c']['labelValue']='Custom';

    $dictionary['Lead']['fields']['custom_c']['merge_filter']='enabled';

    ?>

    After give Quick Repair and Rebuild.

    Hope it helps !

    Thanks

  • Oh Sir, Thank you so much, I have solved my issue. : )