Removing Access to Retired Knowledge Articles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2025 08:15 AM
Colleagues are saving permalinks and opening retired knowledge articles thinking that is it the most current knowledge article. Is there a way to remove access to knowledge articles after they are retired so colleagues are not able to view knowledge articles after they are retired? If so, how would you complete this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2025 10:04 AM
HI @KindonC ,
Before query BR helps you.
refer this: Restricting access to retired knowledge base docum... - ServiceNow Community
Thanks,
Yaswanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2025 12:56 PM
Thank you! Looking into this solution now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 09:05 AM
This did not assist. I was able to create a client script with the code:
function onLoad() {
var state = g_form.getValue('workflow_state');
if (state === 'retired') {
g_form.showFieldMsg('number', 'This Knowledge Base Article has been retired.', 'info');
var fieldsToHide = [
'topic', 'category', 'published', 'valid_to', 'article_type',
'workflow_state', 'source', 'roles', 'direct',
'display_attachments', 'image', 'short_description', 'text', 'wiki'
];
fieldsToHide.forEach(function(field) {
g_form.setVisible(field, false);
});
hideClientButtons(/Update/);
hideClientButtons(/Mark Public/);
hideClientButtons(/Delete/);
hideTable('related_links_container');
g_form.hideRelatedList('m2m_kb_ci.kb_knowledge');
g_form.hideRelatedList('kb_feedback.article');
}
}
function hideClientButtons(buttonRegex) {
var buttons = document.getElementsByTagName("button");
if (buttons) {
for (var i = 0; i < buttons.length; i++) {
var label = buttons[i].innerHTML.toString();
if (label.match(buttonRegex)) {
buttons[i].style.display = 'none';
}
}
}
}
function hideTable(className) {
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
if (tables[i].className === className) {
tables[i].style.display = 'none';
}
}
}
However, I was unable to block the "copy permalink" from being able to copy and paste in the browser. Is there a way to prevent this from happening?