---
description: Deletes a record from the database.
---

# deleteRecord

## Parameters

1. options - json object
   * id - the record id. Optional. By default, this is the current record id. (The current record id can be accessed here: app.actualRecordId)
   * noConfirmMessage - Optional. By default, this is false. If set to true, you will not get a confirm MessageBox. the record will be deleted.

## Example Usages

1\. Simple

```javascript
app.deleteRecord(); //deletes the current displayed record
app.deleteRecord({ id: app.actualRecordId }); //deletes the current displayed record
```

2\. Simple - No Confirmation

```javascript
app.deleteRecord({ noConfirmMessage: true }); //deletes the current displayed record without confirmation
```

3\. Without displaying the record

```javascript
   let myRecord = await app.loadRecord("myKeyControl"); loads a record into myRecord
   app.deleteRecord({id: myRecord.id}); //deletes the loadedRecord
```

### Return Values

Function does not explicitly produce return value.
