How to render KB article content in configurable workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 07:01 AM
Hi,
I have a requirement where I need to render KB article content (HTML) on a workspace page.
I came across a UI builder component for this.
Knowledge Content
https://developer.servicenow.com/dev.do#!/reference/next-experience/xanadu/shared-components/sn-know...
But this component is not rendering if we modify it's configuration values.
If I change sys_id of KB or update HTML then this component just breaks and does not show anything.
Not able to find any working example for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 11:08 AM
I checked the difference between the configurations after a manual simple edit and it looks like UI Builder is deleting "empty props". That is props that are null or empty arrays. The templateFieldData being deleted seems to be the problem here, as when I added it back the component gets rendered again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 11:32 AM
Thanks @Kevin83 .
I didn't get it completely. Where do you "addtemplateFieldData".
Can you share the link of the record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 11:36 AM - edited 10-09-2024 11:36 AM
I reply I went to the sys_ux_macroponent record for the page I was editing, and was comparing the composition field. You can access that file using the developer menu as pictured: