Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/Getting_Started/MobileDeviceSetup/OfflineValidationRules.htm

## Using Validation Rules on Mobile Devices

Validation rules define specific criteria records must meet before they can be saved. Using validation rules on mobile devices prevents errors when syncing data online and ensures data integrity and consistency across all platforms.

**Who can use this feature?**

* Business Admin Users - Browser
* [Create validation rules](#Create)
* End Users - CRM Desktop (Windows), iPad, iPhone, Windows
* [Log the execution of validation rules on mobile devices](#Log)
* [Sync validation rules on mobile devices](#Sync)
* Users do not require an additional license

### Configuring Offline Validation Rules for

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

To configure this feature:

1. Navigate to **Business Admin > Objects > Veeva Settings**.
2. Select the appropriate **veeva\_settings\_\_v** record.
3. Ensure the **disable\_validation\_rules\_\_v** Veeva Setting is not selected. When selected, this setting disables validation rules for mobile devices.

### Creating Validation Rules

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Business Admin Users](#)

To create validation rules for object records, see [How to Create Validation Rules](https://platform.veevavault.help/en/lr/46866/#how-to-create-validation-rules) for more information.

#### Supported Objects

Generic data entry is defined as data entry made using the standard edit/save features for an object. For example, editing the in-line TSF control on Account does not trigger validation rules; whereas, editing via the related list does trigger validation rules.

Generic data entry is supported for the following objects:

* Custom objects
* account\_\_v
* account\_authorization\_\_v
* account\_plan\_\_v
* account\_tactic\_\_v
* action\_item\_\_v
* address\_\_v
* affiliation\_\_v (not from the Sphere of Influence, only from a related list)
* assessment\_\_v
* benefit\_design\_\_v
* benefit\_design\_line\_\_v
* business\_event\_\_v
* business\_event\_target\_\_v
* call2\_\_v
* call2\_detail\_\_v
* call2\_discussion\_\_v
* call2\_expense\_\_v
* call2\_key\_message\_\_v
* call2\_sample\_\_v
* call\_objective\_\_v
* campaign\_\_v
* campaign\_target\_\_v
* child\_account\_\_v
* clinical\_trial\_\_v
* coaching\_report\_\_v
* contact\_\_v (standard save, not from the Call Report)
* em\_attendee\_\_v
* em\_budget\_\_v
* em\_business\_rule\_\_v
* em\_business\_rule\_configuration\_\_v
* em\_catalog\_\_v
* em\_event\_\_v
* em\_event\_history\_\_v
* em\_event\_material\_\_v
* em\_event\_override\_\_v
* em\_event\_session\_\_v
* em\_event\_session\_attendee\_\_v
* em\_event\_speaker\_\_v
* em\_event\_team\_member\_\_v
* em\_expense\_estimate\_\_v
* em\_speaker\_\_v
* em\_speaker\_cap\_\_v
* em\_speaker\_nomination\_\_v
* em\_speaker\_qualification\_\_v
* em\_vendor\_\_v
* em\_venue\_\_v
* event\_attendee\_\_v
* expense\_attribution\_\_v
* expense\_header\_\_v
* expense\_line\_\_v
* expense\_type\_\_v
* formulary\_product\_\_v
* inventory\_order\_\_v
* inventory\_order\_line\_\_v
* inventory\_order\_allocation\_\_v
* key\_message\_\_v
* medical\_discussion\_\_v
* medical\_event\_\_v
* medical\_inquiry\_fulfillment\_response\_\_v (iPad only)
* medical\_insight\_\_v
* order\_\_v
* order\_line\_\_v
* product\_\_v
* product\_group\_\_v
* product\_group\_map\_\_v
* product\_plan\_\_v
* product\_strategy\_\_v
* product\_tactic\_\_v
* publication\_\_v
* rep\_roster\_\_v
* sent\_email\_\_v
* speaker\_evaluation\_\_c
* territory\_budget\_\_v
* territory\_budget\_transaction\_\_v
* time\_off\_territory\_\_v
* tsf\_\_v (not from the Territory Fields component, only from a related list)
* unsubscribe\_\_v
* unsubscribe\_product\_\_v

Areas of the application which rely on object controls to display data or record data in multiple objects from a single page are supported selectively. Currently support areas:

* Call Reporting
* Account Hierarchy
* Medical Inquiry
* Order Management
* Inventory Management
* Event Attendee Management

Areas not currently supported:

* Acknowledgement of Content
* Account Partner
* My Schedule
* Sphere of Influence
* Product Metrics
* New Account Wizards
* Multichannel Consent
* Multichannel Activity Lines
* Office Best Times
* CLM
* Surveys
* Contracts

#### Supported Functions, Operators, and System Variables for Validation Rules

Some functions, operators, and system variables cannot be supported due to API and application limitations.

The following functions are supported:

* Abs
* Ceiling
* Floor
* Max
* Min
* Round
* Sqrt
* Value
* And
* BlankValue
* Case
* If
* IsBlank
* IsChanged
* IsNew
* IsNumber
* Not
* Or
* PriorValue
* Date
* Day
* Month
* Today
* Year
* DateTimeValue
* DateValue
* Now
* Begins
* Contains
* Find
* Includes
* Left
* Lower
* Regex
* Right
* Substitute
* Text(date/datetime/number, format)
* Trim
* Upper

The following operators are supported:

* (
* &&
* ||
* Or
* <
* <=
* >
* >=
* =
* !=
* +
* -
* \*
* /
* ^
* %
* &
* )

Additionally, the @User system variable is supported. See [System Variables](https://platform.veevavault.help/en/gr/52324/#system-variables) for more information.

### Logging the Execution of Validation Rules on Mobile Devices as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

Every time a validation rule is executed on a mobile device, the following validation rule logging information automatically writes to the user's activity log, enabling easier debugging of validation rules. See [Downloading Activity Logs for Troubleshooting](Sync/ActivityLogs.htm) for more information about user activity logs. Each line represents a line in the log if the rule is executed as a part of a block of validation rules (i.e. call2\_\_v, medical\_inquiry\_\_v):

* VALIDATION\_RULE\_BLOCK\_START | [ObjectType1, ObjectID1], [ObjectTypeN, ObjectIdN],...
* VALIDATION\_RULE\_EVAL|[PASS/FAIL]
* VALIDATION\_RULE\_ERROR|[Error Message]
* VALIDATION\_RULE\_BLOCK\_END

### Syncing Validation Rules on Mobile Devices as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

When end users sync their mobile devices, all active validation rules for all objects the end users have access to are synced. When end users create or update records, the appropriate validation rules run when end users save the records. If fields on the record violate a validation rule, the record is not saved and an error displays for all fields violating the rule.

### Considerations for Validation Rules as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

* Formula fields still evaluate at sync time and are subject to the pre-existing limitations of the Vault CRM app. See [Using Autosync](Sync/UsingAutosync.htm) for more information.
* Validation rules on mobile devices execute against the data downloaded to the device. If the data needed by a validation rule does not exist or is different from what is expected on the Browser platform, inconsistencies may occur.
* A sync error occurs if data passes a validation rule on the mobile device, but fails the validation rule online
* Nulls are treated as zeros for number fields. Validation rules comparing a numeric field to 0 should also include the ISBLANK() function
* In order to ensure consistent behavior across platforms, use the & text operator when concatenating strings
* Updates to child records occur before updates to parent records, which can affect validation rules on parent records. For example, call samples are updated before the parent call is updated.

Additionally, the following should be considered when using validation rules in each of the following areas:

#### Call Reporting

* Validation rules execute against the call and any in-scope child call data. For example, if a Call Report contains Call Discussion, Call Detail, and Call Sample data, validation rules are executed against each of the child records when saving, signing, or submitting a Call. This means multiple validation errors can occur for the same object.
* Validation rules are executed when selecting Sign from the All Actions menu of a CLM presentation
* If a validation rule is violated, the Call Report displays so the issue can be corrected. The CLM session ends.
* Selecting Done from the All Actions menu of a CLM presentation does not run validation rules
* Selecting Launch Media from a Call Report does not run validation rules
* Validation rules are not executed during implicit save of the Call Report

#### Medical Inquiries

* Validation rules execute against the medical\_inquiry\_\_v header record, as well as any related Medical Inquiry objects created in the transaction (ones created using the Multiple Product Inquiries section attribute)
* Rules execute when saving, signing, or submitting a Medical Inquiry

#### Medical Events and Event Attendee Management

* Validation rules execute against the medical\_event\_\_v header object
* Validation rules are executed when:
* Using the Add My Attendance feature. The rule message displays as an iOS modal.
* Using the Manage Attendees feature. This feature allows the user to add multiple attendees at once. If there are violations when the user selects Add Selected, an error message displays all of the violations. If both violating attendee records and non-violating attendee records are selected, non-violating records are added.
* Using the Add Attendee feature to add attendees one at a time

#### Order Management

* The Split Order feature does not support validation rules
* Validation rules execute on the order\_\_v record and all related order\_line\_\_v records when saving, signing, or submitting an order, as well as selecting Void
* When executing validation rules against order\_\_v and order\_line\_\_v, the rules are not evaluated against child Orders

#### Inventory Monitoring

Validation rules execute against the inventory\_monitoring\_\_v record and all related inventory\_monitoring\_line\_\_v records when saving, signing, or submitting a record.

#### Data Change Requests

* iPad platform
* Validation rules execute when submitting DCRs for account\_\_v, address\_\_v, and child\_account\_\_v records
* Using the Include Optional Fields feature for the New Account and Parent Account Wizards, the user is directed to the expanded edit screen for the Account object during the DCR process. Validation rules execute on only the Account\_\_v record when saving data on this expanded edit screen.
* Validation rules are not supported on the data\_change\_request\_\_v and data\_change\_request\_line\_\_v objects

### Related Topics

[Using Autosync](Sync/UsingAutosync.htm)

[Configuring Record Validation Rules](https://platform.veevavault.help/en/lr/46866/)

[Vault Formula Reference Guide](https://platform.veevavault.help/en/lr/52324/)
