background script for changing the author of multiple KB Articles

Vyanktesh08
Tera Contributor

Hi Team,

 

Could any one help me with the background script for changing the author of the multiple KB articles .

 

that Update All method is not working for me don't know why

3 REPLIES 3

Jaspal Singh
Mega Patron
Mega Patron

Hi Vyanktesh,

Can you share what is that you have used.

SumanthDosapati
Mega Sage
Mega Sage

@Vyanktesh08 

Try below script

var kb = new GlideRecord("kb_knowledge");
kb.addEncodedQuery('giveyourqueryhere'); //update your encoded query here
kb.query();
while(kb.next()){
    kb.author = 'sysid of the author';
    kb.update();
}

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

Ankur Bawiskar
Tera Patron
Tera Patron

@Vyanktesh08 

you didn't share the script and what are you trying to achieve.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader