Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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
Tera Patron

Hi @suru2 

 

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

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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/atul_grover_lng [ Connect for 1-1 Session]

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