formData.mode
(FintechOS Studio 20.1.1 and later)
Returns the mode of the current form (insert or edit).
Return Value
Returns a string containing the form's mode.
Examples
In this example, we log in the browser console when an entity's form is accessed and the mode in which it is accessed (to either add a new record or edit an existing record). For information on how to return a form's source entity, see formData.entityName.
Copy
console.log(formData.entityName + ' opened in ' + formData.mode + ' mode.');