Validation Rules
Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save a record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of true or false.
Validation rules are retrieved by the CT Mobile app during synchronization as part of the metadata archive and then are applied offline. There are several limitations and conditions for validations applied on mobile devices that consider a correlation between synchronized records and the validation process:
-
Synchronized records cannot be validated before the changes are introduced (on the record layout and custom related list).
-
If changes are made in an already synchronized record, this record becomes unsynced.
Validation Logic for Records
The following logic is applied for Activity records that were created in the Calendar or Nearby Accounts modules.
-
After you create a record and open its layout (an unsynchronized record), the validation is performed on records of all tabs and custom related lists.
-
When a synchronized record is changed, for example, a user changes one of the field values, all tabs will be validated, but records of custom related lists are not affected.
Validation Logic for Custom Related Lists
If a record is created or changed on a custom related list, the parent record layout will not be validated. Errors that occur on a record of custom related lists are displayed in a separate section on the Errors screen.
User Permissions
The mobile user should have the following permissions:
-
All fields that are listed in validation rules must be available for editing for a mobile device user, otherwise, they won’t be able to correct the value that might be causing validation error.
-
If a formula field is applied for validation, the data that is used for the formula must also be accessible for editing by a mobile user and loaded to the device for offline mode usage. For example, if the formula references another object.
NOTE:
If a formula field in the validation rule is set to perform a comparison of record ID fields with other values specified in the formula the second value must contain the same amount of characters as the first one, i.e. the right and the left parts of the comparison must match.
For example, the ID field is compared to a specified ID number or another ID field.