AI Search Typeahead - Suggested Results link to native catalog view instead of Portal (Australia)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello,
I'm running into an issue with the Typeahead search widget on a custom Service Portal when searching for catalog items.
- Clicking a Catalog Item under the "Recently Viewed" section opens a blank tab.
- Clicking a Catalog Item under the "Suggested" section correctly identifies the right item, but opens it in the native platform view rather than the in-portal view.
Based on my research, I suspect this is related to the AI Search configuration, but I've tried everything I could find to resolve it so far. I came across a KB article suggesting the "SPSearchResultActions" script include may be the cause, but mine is still the out-of-box version, and I also tried re-uploading the version provided in the KB, but neither made a difference.
Any guidance would be greatly appreciated. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hey there! I totally feel your pain on this one. Service Portal search quirks—especially when AI Search, custom widgets, and portal vs. native routing collide—can be absolute headaches to troubleshoot.
Since you’ve already checked the SPSearchResultActions script include, let's look at the underlying culprits for these two specific symptoms. Both issues usually boil down to how the search result configurations define action payloads and target URLs for AI Search results, particularly for custom portals where default routing sometimes fails to pick up the portal context.
Here is how you can track down and fix both of those behaviors:
"Recently Viewed" opens a blank tab
When a result from "Recently Viewed" (often driven by user history/recent searches or specific Genius Results/AI Search payloads) opens a blank tab, it usually means the URL being generated is either missing parameters, pointing to an incorrect route, or triggering a client-side navigation block.
Check the Search Application Configuration: Navigate to AI Search > Search Application Configurations and open the configuration tied to your custom portal (usually the Service Portal configuration or your custom clone).
Inspect Result Actions / Action Mappings: Look at how the Genius Result or Record action maps to the target table (e.g., sc_cat_item).
Verify the Target URL / Geniuses: Recently Viewed items often pull from user logs or specific tables where the stored link doesn't respect the portal suffix. Ensure the action mapping uses a dynamic routing function (like standard Service Portal routing) rather than a hardcoded desktop link (like $sp.do?id=sc_cat_item... missing the correct portal prefix or sys_id).
"Suggested" opens in the native platform view (nav_to.do or standard UI)
This is a classic symptom where the search source or result configuration is returning a URL geared toward the backend UI instead of translating it into the Service Portal route (/sp?id=sc_cat_item&sys_id=...).
Check AI Search Result Configurations:
Go to AI Search > Result Settings > Search Result Configurations.
Look for the configuration handling Catalog Items (sc_cat_item).
Check the Action assigned to the result. If it's pointing to a standard platform URL or using a generic record opener that defaults to the backend view, it will break out of your portal.
Override the Link Generation in the Typeahead Widget: If the AI Search payload itself is sending a native link, you can intercept and fix it directly inside your custom Typeahead widget's client controller or template.
Look at where the click handler processes the selected result item.
If item.url or item.target_url contains a native link, you can rewrite it dynamically in JavaScript before navigation happens:
Check Search Sources (If hybrid): If your Typeahead is falling back to legacy search sources alongside AI Search, ensure the AI Search Source mapping explicitly defines the portal page route in its Gen_URL or template configuration fields.JavaScript
If tweaking the AI Search result action mappings doesn't immediately force the correct portal route, your safest and most controlled fix is to handle the routing override directly in your custom Typeahead widget's click handler. By forcing the URL to construct as ?id=sc_cat_item&sys_id=[sys_id] whenever a catalog item is clicked, you completely bypass the risk of AI Search throwing a native platform link or a blank tab.