Need to send a notification to Author and KB owner for expiration of knowledge article?

Ramu6
Tera Contributor

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

 

10 REPLIES 10

Ramu6
Tera Contributor

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);
}