How to show fields on KB View UI page?

Jana_S
Tera Expert

Hey,

 

I followed the article below in an attempt to display some of my custom fields from the kb_knowledge.do table on the kb_view UI page, but it doesn't seem to be working. I also tried modifying the kb_view_common_content script, but without success. Any advice or assistance would be greatly appreciated.

 

 

https://community.servicenow.com/community?id=community_blog&sys_id=919c2ee1dbd0dbc01dcaf3231f96192f

3 REPLIES 3

Jana_S
Tera Expert

@Ankur Bawiskar is this possible? Any suggestions? thank you.

@Jana_S 

Sorry I didn't explore much on this.

But what update did you make, what debugging did you do?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Jana_S
Tera Expert

Hi @Ankur Bawiskar

Thank you for getting back to me. My scenario:
I have created two custom fields called u_clearance_level & u_eta_time both string fields, I wanted display these fields as read-only on kb_view UI page.  I have tried to add the fields to the kb_view UI Page by going to UI Marco>kb_view_common_content and added the following code for the 'clearance level' field:

<j2:if test="$[knowledgeRecord.u_clearance_level.canRead()]">
	<article id="u_clearance_level">
	<g2:no_escape>$[NS:knowledgeRecord.u_clearance_level]</g2:no_escape>
	</article>
	</j2:if>

I used this article to assist me but I did not create the ACL as we have that requirement. https://www.servicenow.com/community/knowledge-management-blog/controlling-knowledge-article-field-l...).