Resolving Dynamic Linking Challenges in ServiceNow Knowledge Articles
- davidyang88
- May 12
- 2 min read

ServiceNow knowledge management is crucial for efficient information sharing. However, dynamic linking between knowledge articles presents unique challenges, particularly when considering versioning and the distinction between the Service Portal and the standard platform UI. This article explores these issues and provides practical solutions for ServiceNow administrators aiming to ensure seamless navigation for both ITIL users and end-users on the Service Portal.
The core issue stems from the need to link to the latest version of a knowledge article while maintaining the correct user interface (Service Portal or platform UI). Standard links using kb_view.do address versioning but often direct Service Portal users to the platform UI, disrupting the intended user experience.
Common Challenges:
Versioning Conflicts: Ensuring links always point to the most current article version.
UI Discrepancies: Links designed for the platform UI redirecting Service Portal users, or vice versa.
URL Format Inconsistencies: The dynamic nature of Service Portal URLs makes direct linking difficult.
Maintaining Branding: Service Portal links should preserve branding and navigation.
Troubleshooting Solutions:
Custom Widget Modification:
Clone the kb-article-content widget.
Modify the server script to intercept the sys_id parameter.
Implement logic to retrieve the latest article version using KBVersioning script include.
Feed the latest version into the widget's data.
This ensures all users see the most current version of the article.
Server-Side Redirection:
Modify the kb_view UI page to detect the referring URL.
If the referring URL is from the Service Portal, redirect to the Service Portal version of the article.
Use g:evaluate and GlideRecord queries to determine the latest article version.
Custom Parameter Implementation:
Introduce a custom parameter, such as kb_number, to identify articles.
Modify the knowledge content widget to check for this parameter.
Use the kb_number to retrieve the latest article version.
Madrid Knowledge Base Portal Plugin:
Activate the com.snc.knowledge_serviceportal plugin.
This introduces a dedicated /kb portal that facilitates direct permalinking.
Use links in the format: https://<instance>.service-now.com/kb?id=kb_article_view&sysparm_article=KB0010528.
New York Redirect Knowledge Property:
In New York and later releases, utilize the glide.knowman.serviceportal.redirect_kb_view system property.
This property redirects kb_view.do links to the Service Portal.
Check article version:
Accept any sys_id
Check if the retrieved article is the latest version.
If it is not, retrieve the latest version and use that.
Practical Example:
Imagine a knowledge article with links to related articles. If a Service Portal user clicks a link designed for the platform UI, they will be redirected, losing the portal's branding. By implementing a custom widget or server-side redirection, you can ensure users remain within their intended interface.
Alternative Solutions:
For external links, consider using permalinks from the dedicated /kb portal.
Educate knowledge contributors on using appropriate link formats for different UIs.
Conclusion:
Dynamic linking in ServiceNow knowledge articles requires careful consideration of versioning and UI consistency. By implementing custom solutions or leveraging built-in features, administrators can ensure a seamless user experience.