Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a locally installed copy of Sugar CRM but the search works horribly! There is an "Account" with the name: "Dr. John Smith", and if you search for "Smith" that account won't show up in the results. How can you improve or "fix" the search field of Sugar CRM?

share|improve this question
Where are you going to do this search? Which version of Sugar do you have? – Toby Feb 16 '11 at 17:41

I ran into this today. You have to use SQL wildcards. EG Search for '%Smith' and that will get you all Accounts that end in Smith OR search for '%Smith%' and you get get all Accounts that contain 'Smith' anywhere in the name.

Sugar should change this to just always search in phrase rather than search exact phrase that starts with.

share|improve this answer

I had the same problem and solved it by the following code: (Using SugarCRM 6.5.20 CE)

Change the line 1081 of file "./include/SearchForm/SearchForm2.php" from:

$where .=  $db_field . " like ".$this->seed->db->quoted(sql_like_string($field_value, $like_char));


$where .=  $db_field . " like ".$this->seed->db->quoted(sql_like_string("%" . $field_value, $like_char));

this fixed the problem for me.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .