How to change duplicate check column layout

Is there a vardef that can be extended to change the layout of the duplicate check list that is displayed when a record is saved and duplicates are found? I would like to change which fields are displayed in the columns.

Thanks.

  • Hi Brett,

    For instance, for the Leads module, if you check the file modules/Leads/clients/base/views/dupecheck-list/dupecheck-list.php you will see the following array:

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

         ...

    );

    with the fields which actually appear by default when you try to create a Lead and the duplicate check pops up.

    Con can customize the layout by overriding this array in a file located in custom/Extension/modules/Leads/Ext/clients/base/views/dupecheck-list with the fields you want to appear in it. For instance:

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

         array(

              'name' => 'website',

              'label' => 'LBL_WEBSITE',

              'enabled' => true,

              'default' => true

         ),

         array(

              'name' => 'facebook',

              'label' => 'LBL_FACEBOOK',

              'enabled' => true,

              'default' => true

         )

    );

    Hope it helps.

    David.

  • Thanks David. That was exactly what I was looking for and worked great. To help anyone else out in the future that refers to this post, the location to copy the file to should be ./custom/Extension/modules/Leads/Ext/clients/base/views/dupecheck-list/ (David just left off the dupecheck-list folder in the path).

    Also, if the module you are trying to customize the layout on does not have a dupecheck-list.php file at ./modules/<module>/clients/base/views/dupecheck-list/ you can find the base template at ./include/SugarObjects/templates/basic/clients/base/views/dupecheck-list/dupecheck-list.php. You can copy that file to ./custom/Extension/modules/<module>/Ext/clients/base/views/dupecheck-list/ and modify it as needed.