Need to send a notification to Author and KB owner for expiration of knowledge article?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 02:29 AM
Hi Al
I have a requirement that need to send send a email notification to "Author ,KB owner and content owner" Whenever a knowledge article reaches 60 and 30 days before Valid to date?
If need to send warning notification exactly if valid to have due in 60 days and if due in 30 days also?
please help me to achieve to this
Thanks
Ramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 09:27 PM
Hi All,
I have tried this code , it works but it fetches the records which are in less than 30 days and less than 60 days, but i want the records exactly due 30 days or 60 days?
var gr = new GlideRecord('kb_knowledge');
gr.addEncodedQuery("workflow_state=published^valid_toRELATIVELT@dayofweek@ahead@30^ORvalid_toRELATIVELT@dayofweek@ahead@60^valid_to>=javascript:gs.beginningOfToday()");
gr.query();
while (gr.next()) {
gs.eventQueue('sn_hr_core.knowledge expiry', gr, gr.author, gr.kb_knowledge_base.owner);
}