How to add more information/custom fields to Global Search Results ?

Hello Team,

Please see below screen shot, I want to add more std/custom fields to global search results.

GlobalSearch.png

Version : 7.7 Ent

Thanks,

Shyam

  • 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.

    Good luck,

    KGM

  • Hi KGM

    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

    Thanks,

    Shyam

  • Kristjan Geir Mathiesen

    Please see below screen shot, now you will get more clarity and sorry for my previous screen shot, it's confusing.

    GlobalSearch.png

    Thanks,

    Shyam

  • 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!

    KGM

  • 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:

    Screen Shot 2016-06-28 at 9.51.31 AM.png

    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:

    Screen Shot 2016-06-28 at 9.55.01 AM.png

    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!

    -Alex

  • Hi Alex Nassi
    Thanks 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.

    Thanks,

    Shyam

  • Hi Shyam,

    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 Dev Club 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.

    Alex

  • 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(
            array(
                'name' => 'primary',
                'fields' => array(
                    array(
                        'name' => 'picture',
                        'type' => 'avatar',
                        'size' => 'medium',
                        'readonly' => true,
                        'css_class' => 'pull-left',
                    ),
                    array(
                        'name' => 'name',
                        'type' => 'name',
                        'link' => true,
                        'label' => 'LBL_SUBJECT',
                    ),
                ),
            ),
            /*array(
                'name' => 'secondary',
                'fields' => array(
                    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.

    -BPATEL

  • 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.

    Thanks,

    Shyam

  • Bhavesh Patel

    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.

    clients\base\views\quicksearch-results\quicksearch-results.js

    GlobalResultHTML.png

    Thanks,

    Shyam