GlideRecord - deleteMultiple()

Deletes multiple records according to the current "where" clause.

This method does not delete attachments.

Dot-walking is not supported for this method. When using the deleteMultiple() function on referenced tables, all the records in the table are deleted. Also, when using deleteRecord() to cascade delete, prior calls to setWorkflow() on the same GlideRecord object are ignored.

Do not use deleteMultiple() on tables with currency fields. Always delete each record individually. Also, do not use this method with the chooseWindow() or setLimit() methods when working with large tables.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description

Scoped equivalent

To use the deleteMultiple() method in a scoped application, use the corresponding scoped method: Scoped GlideRecord - deleteMultiple().

function nukeCart() {
      var cart = getCart();
      var id = cart.sys_id;
      var kids = new GlideRecord('sc_cart_item');
      kids.addQuery('cart', cart.sys_id);