<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Best way to delete multiple record in servicenow in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3076109#M1081</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/797415"&gt;@MK-p&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My recommendation would be instead of deleting those record you can archive it. Benefit of archive is you can refer any point of time in future and if these records are not relevant to your client then you can use below code to delete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a fix script and use below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var grObj = new GlideRecord('your_table_name');
grObj .addEncodedQuery('your_encoded_query'); // Specify the condition for the records to delete
 grObj .deleteMultiple();

//For Example
//if i want to delete all incident having no short description then my code would be like this.
var incGr = new GlideRecord('incident');
    incGr.addNullQuery('short_description');
    incGr.deleteMultiple();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Please Mark&amp;nbsp;Correct if this solves your query and also mark&amp;nbsp;Helpful if you find my response worthy based on the impact.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Runjay Patel&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 06:23:49 GMT</pubDate>
    <dc:creator>Runjay Patel</dc:creator>
    <dc:date>2024-10-17T06:23:49Z</dc:date>
    <item>
      <title>Best way to delete multiple record in servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3075540#M1072</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to delete around 20k record, could you please help me the best way to do so. I don't want to make my system slow during deletion.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 14:01:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3075540#M1072</guid>
      <dc:creator>MK-p</dc:creator>
      <dc:date>2024-10-16T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to delete multiple record in servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3075762#M1076</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/797415"&gt;@MK-p&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The best way, ServiceNow introduced Delete Jobs (module name). Using it you can select the table and filter the table.&lt;BR /&gt;Clicking Execute now, will delete the records.&lt;BR /&gt;&lt;BR /&gt;The best thing is, it is best way when compared to scripts. The system does not slow down.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If the above information helps you, Kindly mark it as Helpful.&lt;BR /&gt;Regards,&lt;BR /&gt;Najmuddin.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 17:47:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3075762#M1076</guid>
      <dc:creator>Najmuddin Mohd</dc:creator>
      <dc:date>2024-10-16T17:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to delete multiple record in servicenow</title>
      <link>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3076109#M1081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/797415"&gt;@MK-p&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My recommendation would be instead of deleting those record you can archive it. Benefit of archive is you can refer any point of time in future and if these records are not relevant to your client then you can use below code to delete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a fix script and use below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var grObj = new GlideRecord('your_table_name');
grObj .addEncodedQuery('your_encoded_query'); // Specify the condition for the records to delete
 grObj .deleteMultiple();

//For Example
//if i want to delete all incident having no short description then my code would be like this.
var incGr = new GlideRecord('incident');
    incGr.addNullQuery('short_description');
    incGr.deleteMultiple();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Please Mark&amp;nbsp;Correct if this solves your query and also mark&amp;nbsp;Helpful if you find my response worthy based on the impact.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Runjay Patel&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 06:23:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/best-way-to-delete-multiple-record-in-servicenow/m-p/3076109#M1081</guid>
      <dc:creator>Runjay Patel</dc:creator>
      <dc:date>2024-10-17T06:23:49Z</dc:date>
    </item>
  </channel>
</rss>

