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:
- Define which field to use in the query (for example, CUSTKW02).
- Check if the field, CUSTKW02 in this case, contains the value Open.
- If the condition is met, then display a message and return a False value. Note: Record deletion is not allowed in this case.
- If the condition is not met, then return a True value. Note: Record deletion is allowed in this case.