AnsweredAssumed Answered

add custom module to global search using manifest file

Question asked by Ramblin Ramblin on Mar 6, 2014
SugarCRM CE v6.5.16 on CentOS 6.4

I am trying to add the name field from a custom module to the Global Search via instructions in the Manifest file.

I do NOT want to have to depend on the user to manually use admin -> Global Search -> Drag and Drop to make this work ; I want to do all the necessary steps via Manifest file entries.

The existing documentation does not work for me

There are several posts on this for v6.2 which I am assuming are still valid for v6.5.16, but they do not work for me.
http://developer.sugarcrm.com/2010/09/23/adding-custom-modules-to-global-search/
and
http://developer.sugarcrm.com/2011/04/29/howto-add-custom-fields-into-the-global-search/
and then summarized in
http://developer.sugarcrm.com/tag/global-search/

I am testing this on a basic custom module I created called Rel2_Module1


The instructions above say to add entries:

In custom/Extension/modules/Rel2_Module1/Ext/Vardefs/add_to_global_search.php (any file name works)
<?php
$dictionary['Rel2_Module1']['unified_search'] = true;
$dictionary['Rel2_Module1']['unified_search_default_enabled'] = true;
$dictionary['Rel2_Module1']['fields']['name']['unified_search'] = true;
?>
In custom/modules/Rel2_Module1/metadata/SearchFields.php
<?php
$searchFields['Rel2_Module1']['name'] = array( 'query_type'=>'default')
?>
Repair and Rebuild


I do this and try a global search for (any string) and the result does NOT include the custom module.

One of the instructions says that, in addition to doing the above, you then have to go and manually add the custom module to the Global Search set using the admin->Global Search option in the user interface, which kind of defeats the whole point of doing this via the Manifest file.

Is it possible to add a field from a custom module via the Manifest file WITHOUT having to also use admin -> Global Search -> Drag and Drop ?

If so, can you see what I am doing wrong / missing to make it happen?

Outcomes