I want to update 8238 records Active=True is it possible in servicenow

kranthi2
Tera Expert

Hi,

I want to update 8238 records Active=True is it possible in servicenow.

kranthi2_0-1702384332105.png

 

kranthi2_1-1702384351033.png

 

 

6 REPLIES 6

Aniket Chavan
Tera Sage
Tera Sage

Hello @kranthi2 

Is there any update on this? did you implemented the suggested solution? and if yes and if thay worked please 

Mark Correct if this solves your issue and also mark 👍Helpful and close the thread for future readers if you find my response worthy based on the impact.

 

Thanks and Regards,
Aniket

Birla_Krushna
Tera Contributor

Hi @kranthi2 

 

You can achieve this in multiple ways, however, ServiceNow recommends OOB features which is provided by them recently.

Request you to follow below steps:

  • Open the list view of that specific table and apply filters as per your requirement. In your case, it should be only active=false
  • Now, you can see all records which are active false. Your next step would be, right click on column and click on Data management and update all with preview. 

Birla_Krushna_0-1702566532001.png

       

  • Once you open that, you need to add required condition as active is false and in Fields & values active = true
  • Lastly, you just need to click on execute now link.

Birla_Krushna_1-1702566755088.png

 

Another approach is you can create fix script for this, and use update multiple method as below,

 

var rg = new GlideRecord('<Table_Name>');
rg.addQuery("active", "false");
rg.query();
rg.setValue("active", "true");
rg.updateMultiple();

 

Let me know your views on this.

Please @kranthi2 mark my answer as Helpful and the Solution accepted if it this solves your issue.

Thanks & Regards,
Krushna Birla

Senior Software Engineer

 

You can reach out to me via LinkedIn : https://www.linkedin.com/in/krushna-birla-2ba4a1152/