Delete Record


Deletes a record in a component that has been bound to one or more tables.


The Delete Record button adds the ability to delete a record from a data bound UX component. The button can be placed on the UX component by selecting it from the list of pre-defined control in the Defined Controls section of the UX Builder.

The Delete Record button has a client-side Enable expression that will disable the control if the current record is a new record.


This control can only be used if you have loaded primary keys for the primary table. You can load primary keys using the 'Load Primary keys for Parent Table' server-side action in the onDialogInitialize event, or in an Ajax callback, using the 'Get Primary Key values for Records in a Query' Action Javascript.

The button calls the {dialog.object}.deleteRecord() JavaScript method when clicked. You can customize this action by passing additional parameters to the deleteRecord() method. For example, you could specify that the component should display a new record after deleting the current record:

var deleteOptions = { nextRecordToShow : 'newrecord' };


Or, you could suppress the confirmation message:

var deleteOptions = { confirmation : false };


See {dialog.object}.deleteRecord() for more information about available parameters.


Deleting a Record in a Data Bound Component

In a UX component that has been bound to one or more tables, you can delete a record from the primary table to which the UX component has been bound using the Delete Record button.


Data bound UX Component Only

See Also