Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

background script for changing the author of multiple KB Articles

VyankteshK
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

Hi Vyanktesh,

Can you share what is that you have used.

SumanthDosapati
Mega Sage

@VyankteshK 

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

@VyankteshK 

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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader