Please see below screen shot, I want to add more std/custom fields to global search results.
Version : 7.7 Ent
Hello Shyam Gaikwad,
I have done this customization for my one of the existing client.
I have share my code with you.I have done this for opportunities module. I have remove date_closed into global search.
Put this file into /<>/custom/modules/Opportunities/clients/base/views/search-list/search-list.php
$viewdefs['Opportunities']['base']['view']['search-list'] = array(
'panels' => array(
'name' => 'primary',
'fields' => array(
'name' => 'picture',
'type' => 'avatar',
'size' => 'medium',
'readonly' => true,
'css_class' => 'pull-left',
'name' => 'name',
'type' => 'name',
'link' => true,
'label' => 'LBL_SUBJECT',
'name' => 'secondary',
'fields' => array(
'name' => 'date_closed',
'type' => 'date',
'label' => 'LBL_DATE_CLOSED'
You need to add your field in to array.
Do Repair & Rebuilds.
Hope it will help you. If you need more help let me know.
Hi Shyam Gaikwad
Hope I am understanding your question correctly:
In Studio, choose the module from which you want to add fields from to the global search. Navigate to Search -> Search and then drag the fields over to the "Default" half:
Save & Deploy.
You might also have to do "Schedule System Index" which is under Admin -> Search.
Thanks for the reply, actually I want display more custom fields on Global result page, if you see the screen shot, I want to add phone fields next to the Shipping fields.
Kristjan Geir Mathiesen
Please see below screen shot, now you will get more clarity and sorry for my previous screen shot, it's confusing.
Ahh, now I understand. Nah, that is beyond my knowledge, sorry. I don´t know how the Global Search picks those fields out.
I assume you´ve played with the boost value.
Sorry I couldn´t help but good luck with this!
Hi Shyam Gaikwad,
The fields that appear in the Global Search results are the fields that contain the string you are searching. In your screenshot, ZYMOGENETICS appears as the Account Name, but also in the Description field, which is why the Name and Description field appear.
I created a field to show this, called "search field" (and made this searchable using the method Kristjan Geir Mathiesen explained above). I populated a few records with the string "qwerty" and variations of it, across a few different fields, including my custom "search field" field. When searching the phrase "qwerty" in Global Search, here is what I see:
You can see that the Description and Search Field fields show on the first result because they both contain "qwerty", but the second result just shows the Account Name, since no other fields contain the string "qwerty".
If you hit Enter on your search, you will see "All Results" which displays additional information. For Accounts, the Name, Primary Email Address, and Office Phone fields show by default, and also the ability to preview the record in the RHS panel:
The Global Search section of the 7.7 User Guide explains this in much more detail if you would like more information.
I hope this helps!
Hi Alex NassiThanks for the reply, I got it what you are saying.
Actually my scenario is a different, we have duplicate Accounts records, which having unique shipping address, when user global search with company name e.g. "ZYMOGENETICS INC" , user is seeing lots of list with same account name, here user is confusing to choose the specific account, if we show here shipping address too then he can choose specific account as per shipping address.
That makes sense. I was trying to add some additional information about how this functionality works out-of-the-box. As a workaround, for situations like this, I'd personally recommend that your users go into the "All Results" (to see the Preview) or search in the Accounts module directly (to see the results on the list view).
However, since you posted this question in the Developer space, hopefully another member of the community is better able to point you in the direction of how to customize the results that appear.
Sorry that I could not be of more assistance! I'll follow up if I hear or come up with any additional ideas.
Hi Bhavesh Patel
Thanks for the reply, if possible please share screen shot for what you have changed in Global Search List. So it will help me understand.
Sorry Bhavesh I was busy with other stuff, didn't get time to check your suggestion. Just now I have checked, it's works for me, this is what I am looking for, thank you..
Just sharing, I have override below file and formatted subtext address info (HTML), please see below screen shot.
Retrieving data ...