JSON Validate Action
The Validate action defines whether a user is able to perform the current action or not. For example, if a user is trying to update or insert a new record, then the Validate action determines whether the user can create or update the record (True), or whether to return the user to the record without making any changes (False).
The Validate action is usually performed from within an invoked function which specifies a set of conditions. If the conditions are not met, then a message is displayed informing users why the change cannot be made and a False value is set. The Validate action then returns the users to the record they were viewing. If the conditions are met, then the invoked function sets a True value, and the Validate action allows users to make the change.
The typical format of a Validate action is as follows:
return "[ {\"action\":\"validate\",\"result\":\"trueorfalse\"} ]";
where "trueorfalse" can contain one of the following:
- True indicates that the user is able to complete the action.
- False returns the user to the record that the user was viewing, and no changes are made.
Â