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 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.