{dialog.object}deleteRecord Method
Syntax
Arguments
- options
Optional. A JSON object with one or more of the following properties:
- options.nextRecordToShowstring
If blank, then the next record in the keylist is shown. If 'newrecord', the new record is shown.
- options.confirmationboolean
A true/false value - controls if the confirmation dialog is shown.
- options.serverSideCanDeleteFunctionstring
Name of the Xbasic function to call before the delete is executed.
- options.serverSideAfterDeleteFunctionstring
Name of the Xbasic function to call after the delete is executed.
Description
Deletes the current record in the 'primary' table. Applies only to a component that has been bound to one or more tables.
Discussion
Applies only to a component that has been bound to one or more tables. Deletes the current record in the 'primary' table. (If the component is bound to a single table, the 'primary' table is the table to which the component is bound. However, if the component is bound to multiple (linked) tables, the 'primary' table is the top-most parent table of the linked tables.)
After the record is deleted, focus will move to the next record in the primary key list that has been loaded.
A confirmation dialog will be displayed before the callback is made.
Examples
{dialog.object}.deleteRecord();
To give focus to a new record (not the next record in the key list) after the delete:
{dialog.object}.deleteRecord({nextRecordToShow :'newrecord'});
To delete without displaying the confirmation dialog:
{dialog.object}.deleteRecord({confirmation: false});
See Also