JavaScript onDelete Functions


The onDelete functions include the following:

  • fieldsOnDelete. Defines the fields against which a query will be performed.
  • onDelete. Defines an action by executing, for example, an IF query and returning either a True or False value. Returning True allows record deletion, but returning False prevents record deletion.
  • showAlert. Similar to a callback function, showAlert displays a message to users on their device. You can also use showAlert within an onDelete query to inform users why a record cannot be deleted. You can embed the message or use custom device messages. For more information, see "Custom Device Messages and Multiple Language Installations".
  • setUserAction. Used to determine whether the record is going to be removed from the device, or deleted from the data source. Not all data sources support deletion.