- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 03:14 AM
Hi ,
author is not able to edit the knowledge article whenver checked by other person and he is receiving error "This article cannot be edited since it is already checked out ".
can y
ou tell me which role required to author to edit the knowledge article :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 03:23 AM
Hi @chandan31 ,
Hope you are doing great.
To resolve this issue, there are a few steps we can follow:
- we need to identify who currently has the knowledge article checked out. This can be done by querying the sys_updated_xml in ServiceNow.
var articleSysId = '<knowledge_article_sys_id>'; // Replace with the actual sys_id of the knowledge article
var gr = new GlideRecord('sys_update_xml');
gr.addQuery('sys_scope', articleSysId);
gr.query();
if (gr.next()) {
var lockedBy = gr.locked_by;
gs.info("The article is currently checked out by: " + lockedBy);
} else {
gs.info("The article is not currently checked out by anyone.");
}
Once we identify the person who has the article checked out, request to release the lock. They can do this by navigating to the knowledge article record and clicking on the "Release Lock" button. Or as admin, you can also release the lock on their behalf.
- If unable to release lock, use unlock record functionality to forcibly release the lock.
var articleSysId = '<knowledge_article_sys_id>'; // Replace with the actual sys_id of the knowledge article
var gr = new GlideRecord('sys_update_version');
gr.addQuery('name', articleSysId);
gr.query();
if (gr.next()) {
gr.unlock();
gs.info("The article's lock has been forcibly released.");
} else {
gs.info("The article does not have an active lock.");
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 03:23 AM
Hi @chandan31 ,
Hope you are doing great.
To resolve this issue, there are a few steps we can follow:
- we need to identify who currently has the knowledge article checked out. This can be done by querying the sys_updated_xml in ServiceNow.
var articleSysId = '<knowledge_article_sys_id>'; // Replace with the actual sys_id of the knowledge article
var gr = new GlideRecord('sys_update_xml');
gr.addQuery('sys_scope', articleSysId);
gr.query();
if (gr.next()) {
var lockedBy = gr.locked_by;
gs.info("The article is currently checked out by: " + lockedBy);
} else {
gs.info("The article is not currently checked out by anyone.");
}
Once we identify the person who has the article checked out, request to release the lock. They can do this by navigating to the knowledge article record and clicking on the "Release Lock" button. Or as admin, you can also release the lock on their behalf.
- If unable to release lock, use unlock record functionality to forcibly release the lock.
var articleSysId = '<knowledge_article_sys_id>'; // Replace with the actual sys_id of the knowledge article
var gr = new GlideRecord('sys_update_version');
gr.addQuery('name', articleSysId);
gr.query();
if (gr.next()) {
gr.unlock();
gs.info("The article's lock has been forcibly released.");
} else {
gs.info("The article does not have an active lock.");
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 03:50 AM
Hi ,
i know that admin can edit the knowledge article if checked out by any user , but i want that other than admin any other role is there to edit the knowledge article .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 11:52 AM
Where is this script run? Or, how can I create the "release lock" button on the knowledge article form. There is no "Release Lock" button anywhere on the Knowledge article form. And, there is no such button already listed in the UI Actions which I thought may have been made inactive on the Knowledge article form.