Defining a Query in the onDelete Function


The following procedure shows you how to define a query in onDelete, which involves defining what you want to query or check, and what you want to happen as a result of running the query.

To define a query in the onDelete function:

  1. Define which field to use in the query (for example, CUSTKW02).
  2. Check if the field, CUSTKW02 in this case, contains the value Open.
  3. If the condition is met, then display a message and return a False value. Note: Record deletion is not allowed in this case.
  4. If the condition is not met, then return a True value. Note: Record deletion is allowed in this case.