I’ve been trying to add some custom fields to be included in the Global Search but I am not having any success. I have AOD turned off because I prefer the basic search.
I’ve followed the instructions here: https://developer.sugarcrm.com/2011/04/29/howto-add-custom-fields-into-the-global-search/
but it doesn’t work for me.
I’ve found that if I update \cache\modules\unified_search_modules.php it works perfectly, but anytime a Quick Repair / Rebuild is done, that file is rebuilt and the custom field is no longer on there. So I just need to know how to make it so the custom field is added to that file whenever it is rebuilt.
Here are my files:
<?php $dictionary['Opportunity']['fields']['phone_c']['inline_edit']=''; $dictionary['Opportunity']['fields']['phone_c']['labelValue']='Phone Number'; $dictionary['Opportunity']['fields']['phone_c']['unified_search']=true; ?>
and in \custom\modules\Opportunities\metadata\SearchFields.php I have added to the array: $searchFields[‘Opportunities’] = array (
'phone_c' => array ( 'query_type' => 'default', ),
Any help would be greatly appreciated.