Restricting access to retired knowledge base documents

mflexman
Kilo Contributor

When opening articles via their permalink it isn't shown if the article has been retired - hyperlinks from one article to another can then point to retired documents without the reader knowing. For example KB001xxxx is retired, but accessing via the following URL there is no way of knowing this: https://instance.service-now.com/kb_view.do?sysparm_article=KB001xxxx.

Has anyone any ideas of how to get round this?

Many Thanks
Mark

11 REPLIES 11

tony_fugere
Mega Guru

You could build a Business Rule to add "RETIRED" verbiage to the content (short description or body) of the article. This is kinda "wonky" IMHO, but a great workaround to the next option...

OR

You could modify the KB related UI Page and subsequent UI Macros involved, but then you take ownership of the page and forfeit automatic upgrades from SN releases... 😞


geoffcox
Giga Guru

I created a "before query" business rule on the table "kb_knowledge"; it prevents anyone from viewing a retired article. You could add more logic to this to restrict only for certain roles, etc.:



test_knowledge_state();

function test_knowledge_state() {
current.addQuery('workflow_state','!=','retired');
}


Geoff,

When you do this, what happens when a user navigates to that permalink that they already had bookmarked or something? Is the page blank?


geoffcox
Giga Guru

Almost blank. It says something like "Article not found".

I imagine that If you wanted a nicer answer, you could create a knowledgebase article that reads: "The knowledge base article you are looking for has been RETIRED."

Then, in the query script, you could load current with the gliderecord for that knowledgebase article instead of the one they were origiinally linking to.