How to get user who checkout the knowledge article
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 11:57 PM
Hi All,
I have written a scheduled job->script to check and send notification if a knowledge article is check out since 7 days.
The question is how can I send notification to the user who have check out the Article.?
Scheduled Job code:
sendDraftKBNotification();
function sendDraftKBNotification() {
var toDay = new GlideDateTime();
var queryTime = new GlideDateTime();
queryTime.addDaysUTC(-7);
if (toDay > queryTime) {
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('workflow_state','draft');
gr.addQuery('sys_updated_on', '<', gs.daysAgo(-7));
gr.addEncodedQuery('kb_knowledge_base=05b7cac1ff133100158bffffffffffc4^ORkb_knowledge_base=dd1bf50cdb2b0490194bf7461d961948');
gr.query();
while (gr.next()) {
gs.eventQueue('kb.draft.notification', current, null, null);
gr.sys_updated_on=toDay;
gr.update();
}
}
}
At least I would like to know, how can I getUser, who have check out the KA.
Thanks,
Chandan
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 06:54 AM
I believe the user who checked out the article is in the Revised by field - which you can use in the script or as a recipient in your email notification