List view: how to delete all rows on multiple pages

dbullough
Kilo Contributor

We are cleaning up our CMDB and have 66,000 CI on 669 pages (100 CI's per page) with the Class: Next Hop Routing Rule.

We would like to select them all and delete them.   Is there a way to delete them all at once, or do we have to select all (100 at a time)?

The SNMP Routing Probe, has been disabled also so they shouldn't show up again.  

1 ACCEPTED SOLUTION

Hi Dee,



If you are getting a timeout, then go with the script. Let me know how that works.


View solution in original post

9 REPLIES 9

Uncle Rob
Kilo Patron

You may find it easier to delete these via a Fix Script or a Background script (using a GlideRecord query that deletes).  


Chuck Tomasi
Tera Patron

No script needed...



Go to the table definition (e.g. use the menu and go to Configure> Table) and click Delete all records).



find_real_file.png



If you really want a script, I can help with that... Run this in scripts background...



Standard disclaimer: The following code is untested, requires review and potential modifications.



(function () {  


      var rec = new GlideRecord('table_name');  


      rec.deleteMultiple();  


})();  


DURRRR... for a minute there I was imagining Class as a selectable value instead of a table


I just made a note to put this in a future (short) video. There are a few ways to delete records - the easy ones often escape me as well.