Add Fields in Basic Search – SugarCRM / SuiteCRM

Here assume that we are going to add Datepicker in the Basic search panel on Case Module List view.

create the fileSearchFields.php at the custom/modules/Cases/metadata/
and add the following code to this file

$searchFields[‘<module_name>’] =

’email_notification_date’ => array(
‘query_type’ => ‘default’,
‘operator’ => ‘subquery’,
‘subquery’ => ‘SELECT parent_id FROM emails WHERE emails.deleted=0 AND emails.date_entered LIKE’,
‘is_date_field’ => true,
‘db_field’ => array(

copy the searchdefs.php file from modules/Cases/metadata/
and paste it to custom/ modules/Cases/metadata/
and add the following key value array to last in the ‘basic_search’ array

‘open_only’ => array(
‘name’ => ’email_notification_date’,
‘type’ => ‘datetime’,
‘default’ => true,
‘width’ => ‘10%’,

create the file en_us.customcases_email.php at custom/Extension/modules/Cases/Ext/Language/ and add the following code to it

$mod_strings[‘LBL_EMAIL_NOTIFICATION_ON_DATE’] = ‘Notification Received On Date:’;

This label is used as label in basic search

Quick repair and Rebuild is required after making this changes
After making this changes go to case list view.
Notification Received On DatePicker will be shown in basic search Panel.
When selecting date from this and press search button,It will result the rows in case list view. this rows will be all the rows
which have email received on the selected date.

Note :

1. Here, <module_name> means the module name you see in the URL, for example, Contacts, Leads, Accounts, etc.

Hope you find this blog post helpful.

Feel free to add comments and queries, that helps us to improve the quality of posts.

You can contact us at

Thank you.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *