Saloni Tripathi
ServiceNow Employee
ServiceNow Employee

This is how the Recommendations tab (bell icon) appears on the SOW Incident record page today. In this article, we’ll walk through how to control the visibility of the entire Recommendations tab, and also how to selectively show/hide the "Recommended Actions" and "Search" sub-tabs within it - based on conditions like table name.

Screenshot 2025-07-30 at 9.32.53 AM.png

1. Control the visibility of the Search sub-tab

This is the UX Client Script responsible for hiding or showing the Search tab in Recommendations in SOW: recommended_actions_1/hideSearchTab (/nav_to.do?uri=sys_ux_client_script.do?sys_id=44bb4c3dfb1a8a10763dfc785eefdc97)

Screenshot 2025-07-30 at 9.38.50 AM.png

For example, let's hide it for Incident table, so we will go ahead and return true from the client script for "incident" table:

Screenshot 2025-07-30 at 9.43.18 AM.png

As we see, only the Recommendations appear now, and the Search tab is hidden:

Screenshot 2025-07-30 at 9.44.41 AM.png

 

2. Control the visibility of the Recommended actions sub-tab

This is the UX Client Script responsible for hiding or showing the Search tab in Recommendations in SOW: recommended_actions_1/hideRecommendationTab (/nav_to.do?uri=sys_ux_client_script.do?sys_id=04bb4c3dfb1a8a10763dfc785eefdc97)

Screenshot 2025-07-30 at 9.48.23 AM.png

For instance, let's show it for Problem table, so we will go ahead and return false from the client script for "problem" table as well:

Screenshot 2025-07-30 at 9.51.29 AM.png

Leading to the Recommended actions sub-tab to also render for a problem:

Screenshot 2025-07-30 at 9.53.28 AM.png

3. Control the visibility of the whole Recommendations tab on SOW

On the Recommended Actions default UX Screen, the following UX screen condition (/nav_to.do?uri=sys_ux_screen_condition.do?sys_id=e670bfa71b7e025022bc0d81604bcb6c) renders the Recommendations icon and tab:

Screenshot 2025-07-30 at 9.59.57 AM.png

Internally, this calls the canViewRAPanel method of the RecommendedActionsSOWUtilSNC Script Include:

Screenshot 2025-07-30 at 10.01.46 AM.png

 

Here the Recommendations tab can be custom-rendered via roles, tableName etc. For example, let's hide it for the Incident table, so we will go ahead and return false from the script include, specifically for "incident" table:

Screenshot 2025-07-30 at 10.05.35 AM.png

Leading to the Recommendations tab hiding for the incident record while still coming up for other tables:

Screenshot 2025-07-30 at 10.05.54 AM.png

 

⚠️ Upgrade Note

These configurations involve modifying out-of-the-box scripts and script includes.

⚠️ These customizations will have to be addressed separately during app upgrades.

1 Comment