Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Question on Knowledge Article Review Notifications

suru2
Tera Contributor

Hi All,

 

I have one requirement where after 6 months it should send review notification to author and knowledge manager, so for that I 'have created one event in event registry and calling the event in the notification and in the scheduled job, but notification is not triggered when I tested it. I 'have wrote below code in scheduled job.

CODE:-

    var gr = new GlideRecord('kb_knowledge');  gr.addEncodedQuery('workflow_stateINdraft,review,published,pending_retirement,retired,outdated^author=javascript:gs.getUserID()^ORrevised_by=javascript:gs.getUserID()^valid_toONLast 6 months@javascript:gs.beginningOfLast6Months()@javascript:gs.endOfLast6Months()');
    gr.query();
    while(gr.next()){
        gs.eventQueue("review.reminder",gr,gr.author,gr.author.getUserName());
    }
 
Please anyone can help me out on the same where I'm can change the code or making the mistake in the code.
 
Thanks,
1 REPLY 1

Dr Atul G- LNG
Tera Patron

Hi @suru2 

 

Give a try with Flow designer , low code /no code. 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************