Knowledge Article - How to add relative link (url) to another KB article
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2022 07:50 PM
How can I add a link to another KB article which is relative, and will stay in the same portal. I need it relative to work between instances after migration or cloning. This area seems relatively weak compared to other CMS's where there is often a token with a relative link to another article as in Silverstripe, Markdown and other solutions
Two types of URL in ServiceNow - Permalink or ID based
- https://[instance-name].service-now.com/[portal]?id=kb_article_view&sys_kb_id=91df080387151d5065f00e...
- https://[instance-name].service-now.com/[portal]?id=kb_article_view&sys_parm_name=KB0011652
When editing content, it looks like users need to put the URL in as
/[portal]?id=kb_article_view&sys_parm_name=KB0011652 which means the article link will only work in one portal
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2022 08:18 PM
I think that's the reason why OOTB there is also a Knowledge Portal /kb available. If you point all manually edited URLs to that portal, it works for all linking portals.
Another approach is to create a display Business Rule which parses the knowledge article body for any introduced placeholders like {portal_id} and replaces it with the current portal.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2022 09:42 PM
While a technically valid suggestion it is not a realistic one. We are using the new and wonderful Employee Centre to provide a user focussed information solution. ServiceNow is pushing Employee Centre this as the way forward and all solutions should be supported in that, and that alone.
All other CMS solutions have a feature, just like how Knowledge Blocks are replaced in KB Articles, to generate the link to other content at the page compilation time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2022 06:57 PM
I had to pick this up again and note there is already a precedent in here with the Knowledge Blocks. At time of page compile the Block DIV is replaced. All I am asking for is something similar for articles.
<h1>Header</h1>
<p>Body</p>
<p>Hey, look at this <a href="/ukp?id=kb_article_view&sys_parm_name=KB0022333" target="_blank" rel="noopener" title="article KB0022333">article KB0022333</a></p>
<p></p>
<div id="kbblock_KBB0010030_1666317192591_kbblock" class="kb-block-content-item mceNonEditable" style="border: 1px solid #ddd; padding: 10px; margin: 5px 0; disabled: true; display: block; color: #343d47; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: 1.42857; font-weight: bold; width: 95%;">
<div class="block-info" style="display: inline-block; vertical-align: top;">KBB0010030<span class="block-info" style="display: block; margin-top: 3px;">Help us improve your BCAP experience</span></div>
</div>
<p> </p>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 01:25 PM
You don't need to include the portal suffix in the URL.
So instead of linking to
- https://[instance-name].service-now.com/[portal]?id=kb_article_view&sys_parm_name=KB0011652OR
- /[portal]?id=kb_article_view&sys_parm_name=KB0011652
You can link to
- ?id=kb_article_view&sys_parm_name=KB0011652
See also:
Solved: Linking to a KB article from within another KB art... - ServiceNow Community