Results 1 to 2 of 2

Thread: add custom fields in general search

  1. #1
    vcobos is offline Sugar Community Member
    Join Date
    Aug 2011
    Posts
    12

    Default add custom fields in general search

    Hi all,

    I have been looking in the forum and i have not found (or i couldnt see) the answer of my question.

    Im creating fields in the contacts modules, but all of these new fields are not recognized for the general search (top-right hand side) when a search is realised (even not with %).

    i.e:

    -->field with the default name: the general search find the field
    -->field XXXX created: the general search does not find the field.

    Im looking in diff files (unified_search_modules or vardefs) but im not having good luck. Could somebody help me?

    Thank you very much,

    Regards,

  2. #2
    ramesh83 is offline Sugar Community Member
    Join Date
    May 2009
    Location
    Hyderabad
    Posts
    92

    Thumbs up Re: add custom fields in general search


    This is not upgrade safe for time being it will be useful,hope wen u repair and rebuild in cache\modules\unified_search_modules.php wont get any effect
    *This is my documentation as wen i had this type of error i followed this process

    Global Search : if we are searching with email id the data is not displaying from the modules
    Solution :
    1. cache\modules\unified_search_modules.php –this is the file which is used for searching the data in the globalsearch
    2. if your field is there in this file –you will get the result
    3. if we are writing code[adding your field] here directly its not upgrade safe
    4. In My Situtaion I had used this for email field of Accounts, Contacts module not displaying while searching
    I added the Code as :
    'email_address' =>
    array (
    //'vname' => 'LBL_PHONE_ALT',
    'type' => 'varchar',
    ),
    5. htdocs\Sugarcrm\modules\Home\UnifiedSearchAdvanced .php –add below code in this file path
    elseif($field == 'email_address') {
    $clause = "(({$unified_search_modules[$name]['table']}.id IN (SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 and ea.email_address LIKE '{$_REQUEST['query_string']}%')))";
    //echo $clause;echo "email";die();
    //end allow for search by email address

    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Añadir custom fields en el buscador general
    By vcobos in forum Español
    Replies: 3
    Last Post: 2011-11-03, 08:19 AM
  2. Replies: 1
    Last Post: 2009-09-04, 10:02 AM
  3. About General search in Sugarcrm pro v5.2.0d?
    By ramji123 in forum Developer Help
    Replies: 1
    Last Post: 2009-05-21, 02:31 PM
  4. Replies: 1
    Last Post: 2006-03-07, 09:06 PM
  5. General Search
    By brob in forum General Discussion
    Replies: 0
    Last Post: 2006-02-14, 10:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •