I tried to add custom field of Account module in Global search.
please any body guide me for the same.
I tried to add custom field of Account module in Global search.
please any body guide me for the same.
Hi bhavin,
1. Add new file under the custom/Extension/modules/YOUR_MODULE/Ext/Vardefs/customGlobalSearchFields.php directory with the following contents:
<?php
$dictionary['YOUR_MODULE']['fields']['NAME_OF_FIELD_TO_SEARCH']['unified_search'] = true;
ex.
$dictionary['Account']['fields']['accounts_id_c']['unified_search'] = true;
2.Then, you need to add a search definition for the file, which you can specify in the custom/modules/YOUR_MODULE/metadata/SearchFields.php file as shown below :
<?php
$searchFields['YOUR_MODULE']['NAME_OF_FIELD_TO_SEARCH'] = array( 'query_type'=>'default');
For example :
If “$searchFields” array is already available then add below code only :
'accounts_id_c' =>
array (
'query_type' => 'default',
),
Mehul
Thank u for your prompt reply .
yes it is working.
Mehul Bhandari and Bhavin Patel, this still working on Sugar Enterprice12.1? because it wasn`t working on my end.