SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord Delete() Method
(SBM On-Premise/PaaS only) Removes a record from the database.
Parameter | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
bool |
Returns true if the record is deleted from or marked as deleted in the database. |
SBM ModScript version: 11.3.
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" ); } }
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.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.