I have a custom field on Accounts table and I want to enable global search on it such that even if someone enters a part of text of it, it searches and gives the result.
So suppose I call my field as code and have some records with values like “88990”,“23477” and “12347”.
If some one uses global search and enters 347 it should return me the account with code 23477 and 12347.
I have code on custom/Extension/modules/Account/Ext/Vardefs/sugarfield_code_c.php
$dictionary['Account']['fields']['code_c']['inline_edit']='1'; $dictionary['Account']['fields']['code_c']['labelValue']='test code'; $dictionary['Account']['fields']['code_c']['unified_search']=true;
and on custom/modules/Accounts/SearchFields.php I have
$searchFields['Accounts'] = array( 'code_c' => array( 'query_type' => 'default', 'operator' => 'subquery', ) );
I guess will have to add subquery to achieve this.
Can anyone please help me with this?