- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 09:12 AM
We have OOB author field on the KB Article form.
If article is in published state, author should be able to checkout for a new version. I've added condition to the UI Action "Checkout" current.workflow_state == 'published' && current.author == gs.getUserID()
And while author can see the button, upon clicking it it says You cannot checkout this article as it is already checked out.
This author has itil role and does not have any knowledge related roles (that's the main idea here).
How can this be achieved?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2020 10:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2025 02:26 PM
Hi Yogita,
It's been few years and I can't remember correctly, but as far as I'm concerned KBVersioningSNC is never being called directly, that's why you need override a function of your choice in KBVersioning script include. Check out a snippet of the code and adjust it to your needs:
canCheckout: function(current){
if(gs.getProperty('glide.knowman.allow_edit_global_articles')=='false' && this.isArticleReadOnlyBasedOnDomain(current))
return false;
if(this.isExternalArticle(current))
return false;
if(!this._isValidVersion(current))
return false;
if(current.workflow_state!=this.MAJOR_STATE)
return false;
if(current.author==gs.getUserID())
return true;
if(current.u_owner==gs.getUserID())
return true;
//If Ownership Group exist but user is not a member
if(this.isValidFieldWithValue(current,this.OWNERSHIP_GROUP)){
if(!this.hasAnyElevatedAccess(current) && !this.isGroupMemberOrManager(current[this.OWNERSHIP_GROUP]))
return false;
}else if(!this.hasAnyElevatedAccess(current) && !this.safeExecute(this._knowledgeHelper.canContribute, current))
return false;
if(this._getCheckedoutRecord(current))
return false;
return true;
},