Needs to update Kenna priority field value for all CIs

Nikhil kumar ma
Tera Contributor

Hi Community,

 

We need to update the Kenna priority value to "10" for all the CIs in cmdb_ci table. 

Could you please suggest any fix script using which we can achieve this?

 

Thanks and regards,

Nikhil

3 REPLIES 3

Pavankumar_1
Mega Patron

Hi @Nikhil kumar ma ,

if you have data lookup to populate the priority then you need to set the data lookup fields like impact and urgency.

If there is no such data lookup rules then use below code to set priority

var grCmdb = new GlideRecord('cmdb_ci');
grCmdb.query();
//if yu have any data look for priority then need to use imapct and urgency to set priority
//grCmdb.impact='10';
//grCmdb.urgency='10';
grCmdb.priority='10'//add your prioriy name
grCmdb.updateMultiple();

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Hi Pavan,

 

Can we write this script without using impact and urgency? using Kenna priority only.

 

Regards,

Nikhil

Hi @Nikhil kumar ma ,

If it is Data Lookup then you have to use impact and urgency only.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar