The onCancel Function in JavaScript Code

The onCancel function prevents a user from cancelling record creation. The onCancel function has no effect if a record is being edited, You typically use onCancel in conjunction with an onSave command, in which a user is expected to complete record creation. For more information about the structure of JavaScript code, see "JavaScript Structure Used in Swift MEAP."