AppRecord Delete() Method

(SBM On-Premise/PaaS only) Removes a record from the database.

Function Signature

 bool Delete()

Parameters

Parameter Type Description

None

Return

Type Description

bool

Returns true if the record is deleted from or marked as deleted in the database.

Technical Details

SBM ModScript version: 11.3.

Example

var tableId = Ext.TableId("TS_CONTACTS");
var myRecord = Ext.CreateAppRecord(tableId);
var whereClause = "TS_CONTACTFIRSTNAME = 'Joe'";
if (myRecord.ReadWithWhere(whereClause)) { 
  if (!myRecord.Delete()) {
		  Ext.LogErrorMsg("Error Deleting Contact record.");
	 }
  else {
	   Ext.WriteStream( "The Contact record \"Joe\" was deleted" );
  }
}

Notes

On most tables, this method removes the record from the database. On tables such as States and Users, the records are marked as deleted but remain in the database.

CAUTION:
This method immediately deletes the record. The user is not asked to verify deletion.

Related Topics

AppRecord