Ever wanted to do a knowledge article search on a reference field?
I was tasked today with putting a knowledge icon next to a reference field. For most of you who know, this is impossible using the knowledge_search=true attribute. Even though the page says "any field", it really only means "text" fields. Therefore, my dilemma...how do I get this to work?So, I started looking at the ui macros that support the ref_contributions. I simply created my own to show the kb icon for any reference field where I specified ref_contributions=show_kb_articles in the attributes.To accomplish this, I took these steps:Created a UI Macro named "show_kb_articles"Added the attribute to the reference field I wanted to show the icon on: ref_contributions=show_kb_articles
That's it. The UI Macro code is attached
https://www.servicenow.com/community/in-other-news/ever-wanted-to-do-a-knowledge-article-search-on-a-reference/ba-p/2282132