JavaScript onCancel Functions
The onCancel functions include the following:
- fieldsOnCancel. Defines the fields against which a query will be performed.
- onCancel. Defines an action by executing, for example, a query and returning either a True or False value if the condition is met. Returning True allows the user to cancel record creation, but returning false prevents cancellation of record creation.
- showAlert. Similar to a callback function, showAlert displays a message to users on their device.
You can also use showAlert within an onCancel query to inform users why record creation cannot be cancelled. You can embed the message or use custom device messages. For more information, see "Custom Device Messages and Multiple Language Installations".