Skip to main content

Delete Record

Delete one or more Records in a specified Table.

delete_records(tableId: ID, ids: ID[]): Promise<void>;
Parameter NameTypeDescription
tableIdstringThe Id of the Table to Delete the record in.
idsarray of stringsAn array of record Ids to delete.
optionsobjectRecord Delete options.

Delete Record Options

Optional parameters for record Delete.

interface RecordOptions {
skipValidation?: boolean;
}
Example Script - Delete Record

<!--delete_record(appId: ID, ids: ID[], options?: DeleteRecordsOptions): Promise<SimpleRecord[]>;-->

<script>
window.SmartSuite.delete_records('67647d9b7a03fad7da12d9f2', ['6765ecb0e74da2e4072a0836']).then(
(res) => {
console.log('result =>>>', res);
}
);
</script>

Response

200 Ok
[
{
"first_created": {
"by": "63a1f65723aaf6bcb564b1f1",
"on": "2024-12-20T22:16:16.635000Z"
},
"last_updated": {
"by": "63a1f65723aaf6bcb564b1f1",
"on": "2024-12-20T22:16:16.635000Z"
},
"application_id": "67647d9b7a03fad7da12d9f2",
"autonumber": 8,
"ranking": {
"default": "aaaaaaeoiy"
},
"deleted_by": "63a1f65723aaf6bcb564b1f1",
"id": "6765ecb0e74da2e4072a0836",
"application_slug": "swp6a6sm",
"deleted_date": {
"date": "2024-12-20T22:17:48.416000Z",
"include_time": true
},
"title": "new title test",
"comments_count": 0,
"description": {
"data": {
"type": "doc",
"content": []
},
"html": "",
"preview": ""
},
"assigned_to": [],
"status": {
"value": "ready_for_review",
"updated_on": "2024-12-20T22:16:16.913000Z"
},
"due_date": {
"from_date": {
"date": null,
"include_time": false
},
"to_date": {
"date": null,
"include_time": false
},
"status_is_completed": false,
"status_updated_on": null
},
"priority": "",
"followed_by": [],
"sab60f5c5b": "",
"s048e67ec8": "",
"s8f119717f": [],
"se0df7d290": "6765ecb0e74da2e4072a0836"
}
]