Employee Center Catalog Item Navigation from Portal search

SatishKumaJ
Tera Contributor

Hi Team,

Currently, when a user search and clicks on a catalog item in the Employee Center search box, it opens in a new browser tab. We would like to change this behavior so that the catalog item opens within the same page instead.

Could you please advise if there is a recommended approach or configuration in ServiceNow to achieve this?

Thank you.

3 REPLIES 3

Tanushree Maiti
Tera Patron

hi @SatishKumaJ 

 

Refer these community article/posts:

Changing the AI Search navigation on Employee Center [How-To]

KB2289625 Employee Center Catalog Item Email Request Not Working When Accessed via Search 

https://www.servicenow.com/community/developer-forum/open-catalog-items-in-a-new-portal-window-tab-f...

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

SatishKumaJ
Tera Contributor

Hey Tanushree,

Thank you for the links but none of these have the solution to my issue. The first link is talking about the KB articles but I am facing issue with the catalog item which comes in search suggestions and when you click it, it is opening in a new tab. 

Do share if you could find anything on this. Thanks for looking into this!

I noticed this after updating to Zurich Patch 10 Hotfix 3. We had to clone the typeahead search widget and then update the code in the Link section.

Before:

window.open(resultPayload.actionPayload.recordUrl);


After:

window.location.href = resultPayload.actionPayload.recordUrl;


...and then you have to go the header widget and homepage search widget and replace references to typeahead-search with the ID of your cloned one. For example, in the homepage search server script:

    if (aisEnabled)
        data.typeAheadSearch = $sp.getWidget('cloned-typeahead-search', options);
    else
        data.typeAheadSearch = $sp.getWidget('cloned-typeahead-search', options.typeahead_search);