/
Defining a Query in the onCancel Function

Defining a Query in the onCancel Function


The following procedure shows you how to define a query in onCancel, 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 onCancel function:

  1. Define what you want to check in the query (for example, the records in module ID 7).
  2. Check if other records exist, for example, by using an IF query.
  3. If the condition is met, then display a message and return a False value. In this case, you cannot cancel record creation. If the condition is not met, then return a True value. In this case, you can cancel record creation.