
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 10:43 AM
Racking my brain trying to figure out where the properties are set for knowledge that defines who can retire articles.
I understand the UI Action calls a script include but that doesn't give me much to go on. I was hoping the DOCS site would give some indication who can retire knowledge articles. So far I've narrowed it down to:
Knowledge Base Manager
Article-Last Updated By
Any help is greatly appreciated
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 09:22 AM
UI Action:
Retire Condition:
!(new KBCommon().isStackNameDialog()) && (new KBKnowledge().canRetire(current))
This relies on a couple of Script Includes, the first isn't all that important for our purposes. The canRetire calls the KBKnowledge Script Include which in turn calls the KBKnowledgeSNC Script Include which calls KBCommonSNC.
Here is the actual code that determines if you can see the retire button:
canRetireKnowledge: function(itemGr){
// Case 1: Pass in a valid value if (!itemGr)
return false;
// Case 2:If the record is published continue
if (itemGr.workflow_state != "published" && itemGr.workflow_state != "draft")
return false;
// Case 3: If user can contribute continue
if (!new SNC.KnowledgeHelper().canContribute(itemGr))
return false;
// Default: Allow user to retire knowledge
return true; },
UI Action:
Delete Condition: !(new KBCommon().isStackNameDialog()) && current.isValidRecord() && current.canDelete()
This is a little easier in that you have a couple of standard functions: isValidRecord() and canDelete(). Here is a quick script that I wrote to be able to determine the state of these 2 values for a given KB Article:
var current = new GlideRecord("kb_knowledge");
current.get("sys_id", "<sys id of kb article>");
gs.log(current.isValidRecord());
gs.log(current.canDelete());
Both of these are going to rely on the way the user is defined.
For the Retire it will depend on:
- Where the article is in its lifecycle
- If the user is a contributor for the given KnowledgeBase.
The delete is going to rely on the ACL's associated with the kb_knowledge table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2019 11:00 AM
Hi Mathew,
Link explains it in best way.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 04:00 AM
The first line of the article was the info I was looking for. Thanks for sending this. I'm going to run through some scenarios using these roles. You'd think this information would be readily available in docs. Oh well.
Thanks for the quick reply!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 04:50 AM
I did a little more digging. Anyone who has knowledge_manager role can definitely retire an article. The same does not apply for those who have itil. I impersonated someone who has itil and knowledge; they do NOT see the Retire button. Going to submit a HI ticket

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 07:51 AM
Submitted a HI ticket. The link above isn't from servicenow so it's basically wrong. Still trying to find the right answer