# modelglue.GenericDelete

When this message is broadcast, the DataController will attempt to delete a record from a given table.

This message is configured by using the following <argument> tags:

1. Object (Required) - The name of the table from which to delete.

2. Criteria (Required) - A list of viewstate values to use as filters. Any value listed whose name matches a column in the target table will be used as a filter in the query's WHERE clause.

## Examples

### A Basic Generic Delete

To perform a basic delete on the Contact table, the following <message> tag could be added to an <event-handler>:

<message name="modelglue.GenericDelete">

<argument name="object" value="Contact" />

<argument name="criteria" value="ContactId" />

</message>

Assuming an event-handler name of "contact.delete", visiting the event handler with the following URL would result in deleting the contact with a ContactId of 42.

index.cfm?event=contact.delete&contactId=42