Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Custom article templates are not showing in the portal while search and hit enter

DhanalakshmS
Tera Contributor

Hi All,

 

As per the requirement, we have created some custom article templates for knowledge. In the service portal, if we searched the article name/number and if it shows as dropdown to select and open, the article template is showing the article body. But if we searched the name/number and hit enter, then from the search results the header, footer all are visible except the Article Body. Can anyone give some solution? 

 

Thanks in advance,

Dhanalakshmi.

4 REPLIES 4

Kommineni
Tera Contributor

Hi Dhanalakshmi,

 

Since the article body is displaying when you select the article directly from the typeahead dropdown, but not when you press Enter and open it from the search results, I would check the AI Search configuration for the custom Knowledge template rather than the template itself.

Custom Knowledge templates create their own child tables under kb_knowledge. If the custom template table is not included in the AI Search configuration, the search result can resolve the base Knowledge record but may not render the custom template fields correctly. ServiceNow confirms that custom templates are stored as child tables of kb_knowledge.

Please check:

  1. Go to AI Search > AI Search Sources and open the Knowledge search source used by your Service Portal.
  2. Check the Child Tables related list.
  3. Add your custom Knowledge template table, for example u_kb_template_xxx, if it is missing.
  4. Save the configuration.
  5. Re-index the Knowledge AI Search source.
  6. Test again by searching the KB number, pressing Enter, and opening the article from the results.

I have seen the same behavior with custom templates where adding the custom template tables to the AI Search child-table configuration and re-indexing resolved missing custom-template content in search results. 

Also check Service Portal > AI Search > Search Results Actions and make sure the Knowledge result action is configured for your portal and is redirecting to the Knowledge article page (kb_article) rather than a generic form page. An incorrect Search Result Action can cause typeahead and full search results to open the same article differently. 

I would first try adding the custom template child table + re-indexing, as that is the most likely cause here.

Regards,
Shankar Kommineni

Thanks for your reply.

 

I tried the above approach, but still it is not working, the article body is showing up as empty. 

DhanalakshmS_0-1788256816490.png

 

Vishal Jaswal
Tera Sage

Hello @DhanalakshmS 

Custom article templates are saved in their own dedicated tables and that's where the fields you're trying to display are actually stored.

The
article_body field renders correctly because it's an out-of-the-box field on the base kb_knowledge table, however your custom fields live on the extended template tables which the widget doesn't read by default.

As per this community post, try below: https://www.servicenow.com/community/servicenow-ai-platform-forum/search-not-returning-custom-articl... 


Navigate to All > AI Search > Search Sources

VishalJaswal_0-1788206749759.png


Click on Knowledge table under Indexed Source (Table: ais_datasource)

VishalJaswal_1-1788206893245.png

 

Under child tables, add all the custom article template tables.


Hope that helps!

Thanks for your reply, it is not working After the child tables are added. please fine below the image 

DhanalakshmS_0-1788257077186.png