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.

Knowledge Base Review System

Not applicable

Hi,

I was wondering if Service-Now has a review system in place for knowledge base articles?

So, if, after 6 months, an article has not been updated, it can be flagged for review.

Thanks,

Gail 🙂

10 REPLIES 10

Andy
Have you created business rule which fires event ?
If yes is event registred ???...And what are param1,param 2 of ur event.



var watchlistuser = '';
var wathlistusermail = '';
if(current.watch_list!='')
{
watchlistuser = current.watch_list;
var gr = GlideRecord('sys_user');
gr.addQuery('sys_id','IN', watchlistuser);
gr.query();
while(gr.next())
{
wathlistusermail = wathlistusermail+','+ gr.email;
}
}
var emailUser = '';
if( current.opened_by.email != '' )
{
emailUser = current.opened_by.email+','+wathlistusermail.toString();
}

if( current.assigned_to.email != '' )
{
if( emailUser != '' )
{

emailUser = emailUser+','+current.assigned_to.email;
}
else
{
//gs.addInfoMessage('assigned_to loop In');
emailUser = current.assigned_to.email + ','+ wathlistusermail.toString();
//gs.addInfoMessage('assigned_to loop exit: '+emailUser);
}
}

if( current.opened_by.email == '' && current.assigned_to.email == '' && wathlistusermail != '')
{
emailUser = wathlistusermail.toString();
}

gs.log("current.opened_by.email==>>"+emailUser);
var grp ="";
var grpdetail = new GlideRecord("sys_user_group");
grpdetail.addQuery("sys_id",current.assignment_group);
grpdetail.query();
while( grpdetail.next())
{
grp = grpdetail.email;
}

if (current.operation() == 'insert'||current.operation() == 'update')
{
var watchlistuser = '';
var wathlistusermail = '';
if(current.watch_list!='')
{
watchlistuser = current.watch_list;
var gr = GlideRecord('sys_user');
gr.addQuery('sys_id','IN', watchlistuser);
gr.query();
while(gr.next())
{
wathlistusermail = wathlistusermail+','+ gr.email;
}
}
//}
//gs.eventQueue('defect_watchlist.created',current,wathlistusermail,'');
//gs.addInfoMessage('business rule');
//gs.addInfoMessage("current.watch_list.email==>>" + wathlistusermail);
//gs.addInfoMessage('business rule2');
//}

var emailUser = '';
if( current.opened_by.email != '' )
{
//gs.addInfoMessage('openby loop In');
emailUser = current.opened_by.email+','+wathlistusermail.toString();
//gs.addInfoMessage('openby loop exit: '+emailUser);
}

if( current.assigned_to.email != '' )
{
if( emailUser != '' )
{

emailUser = emailUser+','+current.assigned_to.email;
}
else
{
//gs.addInfoMessage('assigned_to loop In');
emailUser = current.assigned_to.email + ','+ wathlistusermail.toString();
//gs.addInfoMessage('assigned_to loop exit: '+emailUser);
}
}

if( current.opened_by.email == '' && current.assigned_to.email == '' && wathlistusermail != '')
{
emailUser = wathlistusermail.toString();
}

gs.log("current.opened_by.email==>>"+emailUser);


//gs.addInfoMessage("final string"+emailUser);


var grp ="";
var grpdetail = new GlideRecord("sys_user_group");
grpdetail.addQuery("sys_id",current.assignment_group);
grpdetail.query();
while( grpdetail.next())
{
grp = grpdetail.email;
}

if (current.operation() == 'insert'||current.operation() == 'update')
{
gs.eventQueue('defect.created',current,emailUser,grp);
}
}


This is my business rule which is after insert/update and runs on rm_defect table .
gs.eventQueue('defect.created',current,emailUser,grp);this is main line it is param1 and param 2 of event i.eemailuser,grp.
email user is email id of openedby,watchlist user and so on and grp is email id of groups...

U need to pass these parameters in email notification.

Cheers !!!