Scoped GlideRecord - deleteRecord()

Deletes the current record.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if the record was deleted; false if no record was found to delete.
var gr = new GlideRecord('incident')
gr.addQuery('sys_id','99ebb4156fa831005be8883e6b3ee4b9'); //to delete one record
gr.query();
gr.next();
gr.deleteRecord();

Output: