- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2023 07:10 AM
I have a business requirement to prevent certain standard change templates from appearing within search results within the Service Portal search bar. Is this possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2023 01:34 PM - edited 05-22-2023 01:40 PM
Go to the Record Producer table, add columns "Table Name" and "Hide on Service Portal" if there are not currently available in the list view. Then just filter the Table column to things you would like to hide (I filtered Table Name by *std_ - Standard Change Proposal in my example below) and make "Hide on Service Portal" true.
You can do the same thing on the Service Catalog -> Maintain Items if there are certain catalog items you want to hide.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2023 01:34 PM - edited 05-22-2023 01:40 PM
Go to the Record Producer table, add columns "Table Name" and "Hide on Service Portal" if there are not currently available in the list view. Then just filter the Table column to things you would like to hide (I filtered Table Name by *std_ - Standard Change Proposal in my example below) and make "Hide on Service Portal" true.
You can do the same thing on the Service Catalog -> Maintain Items if there are certain catalog items you want to hide.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 09:05 AM
Accepting this as the solution since this hides both the catalog menu item as well as hiding the item from search results within the portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2023 01:47 PM
I was able to identify the "No search" column (sc_cat_item.no_search) as an OOTB solution. Problematically, the records I need to prevent from appearing in search results are within the "Standard Change Template" table (std_change_record_producer). To note, std_change_record_producer extends sc_cat_item_producer extends sc_cat_item. With the "admin" role I was able to set "No search" to true and this successfully prevented records from appearing within search results. However, while I was able to edit the "No search" field for "Catalog Items", I am unable to edit the "No search" field for "Standard Change Templates". After much, much, much investigation I was unable to determine the cause. I found no clues looking at ACLs, UI Policies, Client Scripts, etc. Even enabling System Security Debugging was no help since it only showed green/blue for this field with no indication that it was restricted. I was truly hoping for an OOTB solution.
Ultimately, I decided to create a fix script to set the "No search" column to "true" for these records. The script is attached. To protect the customer, the template names genericized to Standard Change Template A, B, C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2023 01:57 PM
While there are multiple ways to do everything in ServiceNow, the "Hide on Service Portal" column, which exist on the "Standard Change Template" table (std_change_record_producer) would've accomplished this with no script needed and is OOTB. Just change False to True.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven