Offline Validation Rules

  • iPad
  • iPhone
  • Windows

SFDC Validation rules are supported offline for CRM for iPad, iPhone, and Windows. Using the standard SFDC Validation Rule editor, data validation logic can be created and synced offline.

Considerations for Offline Validation Rules

  • Formula fields still evaluate at sync time and are subject to the pre-existing limitations of the offline application. See Using Autosync for more information.
  • Offline validation rules execute against offline data. If the data needed by a Validation Rule does not exist or is different than what is expected on the Online platform, inconsistencies may occur.
  • A sync error occurs if data passes offline validation rule, but fails the Online validation rule
  • The $Profile.Name global variable represents the value of the Profile_Name_vod field on the User record
  • Offline validation rules do not support Cross-Object Owner formulas. See the Salesforce documentation about Cross-Object Owner Formulas for more information.
  • Nulls are treated as zeros for number fields. Validation rules comparing a numeric field to 0 should also include the ISBLANK() check.
  • In order to ensure consistent behavior across platforms, use the & text operator when concatenating strings

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 may occur for the same object.
  • Validation Rules are executed when tapping Sign from 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 CLM does not run Validation Rules
  • Selecting Launch Media from the Call does not run Validation Rules
  • Validation Rules are not executed during implicit Save of the Call report

Medical Inquiry

  • Validation rules execute against the Medical Inquiry header object and any related Medical Inquiry objects created in the transaction (ones created using the --mpi section signal)
  • Rules execute when saving, signing, or submitting a Medical Inquiry

Medical Events and Event Attendee Management

  • Validation rules executed against the Medical Event header object in the offline client
  • 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_vod record and all related Order_Line_vod records when saving, signing, or submitting an order, as well as selecting Void
  • When executing validation rules against Order_vod and Order_Line_vod, the rules are not evaluated against child Orders.

Inventory Monitoring

  • Validation rules execute against the Inventory_Monitoring_vod record and all related Inventory_Monitoring_Line_vod records when saving, signing, or submitting a record

Data Change Requests

  • iPad Platform
  • Validation rules execute when submitting DCRs for Account, Address_vod, and Child_Account_vod 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 record when saving data on this expanded edit screen.
  • Validation rules are not supported on the Data_Change_Request_vod and Data_Change_Request_Line_vod objects
  • Windows Platform
  • Validation rules execute when submitting DCRs for Account, Address_vod, and Child_Account_vod 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 record when saving data on this expanded edit screen.
  • Validation rules are not supported on the Data_Change_Request_vod and Data_Change_Request_Line_vod objects

Configuration

  1. Grant administrators the following permissions:

    Object

    OLS

    Record Type

    Fields

    FLS

    Rule_Object_Header_vod

    CRU

    n/a

    All

    Edit

    Rule_Definition_vod

    CRU

    n/a

    All

    Edit

    Rule_Message_Translation_vod

    CRU

    n/a

    All

    Edit

    User

    R

    n/a

    Profile_Name_vod

    Read

  2. Grant administrators access to the Validation_Rule_Admin_Console_vod VisualForce Page.
  3. Grant administrators access to the Validation Rule Administration tab.
  4. Grant end users the following permissions:

    Object

    OLS

    Record Type

    Fields

    FLS

    Rule_Object_Header_vod

    R

    n/a

    All

    Read

    Rule_Definition_vod

    R

    n/a

    All

    Read

    Rule_Message_Translation_vod

    R

    n/a

    All

    Read

    User

    R

    n/a

    Profile_Name_vod

    Read

  5. Activate the following object VMOCs for the appropriate devices:

    • Rule_Object_Header_vod
    • Rule_Definition_vod
    • Rule_Message_Translation_vod
  6. Navigate to the Validation Rule Administration tab.
  7. Sync the Validation Rule Metadata to Veeva CRM.
  8. Select Refresh Validation Rule Data. This initiates an ad hoc sync of the Validation Rule MetaData into Veeva-controlled system objects.

The ad-hoc sync first queries all active VMOCs in Veeva CRM to identify the objects in scope for offline validation rules. If an active VMOC is present for an object that does not exist, for example, due to an incorrect data load, the refresh process cannot complete. Deactivate any VMOCs that exist for non-existent objects before refreshing.

The ad hoc sync process also requires the user have read access to all in-scope objects for validation rules. If there is an active VMOC for an existing object the running user does not have access to, then the sync cannot proceed.

When the above steps are complete and the end user has synced down the rule definitions successfully, all of the Veeva supported validation rules begin to execute the next time the end user enters data and saves a record.

Object Support Details

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
  • Account_Plan_vod
  • Account_Tactic_vod
  • Address_vod
  • Affiliation_vod (not from the Sphere of Influence, only from a related list)
  • Assessment_vod
  • Benefit_Design_vod
  • Benefit_Design_Line_vod
  • Business_Event_vod
  • Business_Event_Target_vod
  • Call2_vod
  • Call2_Detail_vod
  • Call2_Discussion_vod
  • Call2_Expense_vod
  • Call2_Key_Message_vod
  • Call_Objective_vod
  • Call2_Sample_vod
  • Campaign_vod
  • Campaign_Target_vod
  • Child_Account_vod
  • Clinical_Trial
  • Coaching_Report_vod
  • Contact (standard save, not from the Call Report)
  • Event (standard save, not from My Schedule)
  • Formulary_Product_vod
  • Inventory_Order_vod
  • Inventory_Order_Line_vod
  • Inventory_Order_Allocation_vod
  • Key_Message_vod
  • Material_Order
  • Material_Order_Line_Item
  • Medical_Discussion_vod
  • Medical_Event_vod
  • Medical_Inquiry_Fulfillment_Response_vod (iPad only)
  • Medical_Insight_vod
  • Product_vod
  • Product_Group_vod
  • Product_Group_Map_vod
  • Product_Plan_vod
  • Product_Strategy_vod
  • Product_Tactic_vod
  • Publication
  • Rep_Roster_vod
  • Sent_Email_vod
  • Speaker_Evaluation
  • Task (normal edit mode and when created from the Call Report using the Call Followup Template functionality)
  • Territory_Budget_vod
  • Territory_Budget_Transaction_vod
  • Time_Off_Territory_vod
  • TSF_vod (not from the Territory Fields component, only from a related list)
  • Unsubscribe_vod
  • Unsubscribe_Product_vod

Areas of the application which rely on special Veeva controls/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:

  • Acknowledgment of Content
  • Account Partner
  • My Schedule
  • Sphere of Influence
  • Product Metrics
  • New Account Wizards
  • Multichannel Consent
  • Multichannel Activity Lines
  • Office Best Times
  • CLM

    See Validation Rules and Call Reporting for more information.

  • Surveys
  • Contracts

Function and Global Variable Support Details

Some functions and global variables cannot be supported due to API and application limitations.

The following Validation Rules Functions are not supported:

  • ADDMONTH
  • DISTANCE
  • GETSESSIONID
  • VLOOKUP

The following Global Variables are fully supported as indicated:

  • $User
  • $UserRole

The following Global Variables are partially supported as indicated:

  • $Profile
  • $Profile.Id
  • $Profile.Name
  • $Organization
  • $Organization.Id
  • $Organization.Name
  • $Setup
  • $Setup.Veeva_Settings_vod
  • $Setup.Network_Settings_vod
  • $Setup.Approved_Email_Settings_vod
  • $Setup.Concur_Settings_vod
  • $System
  • $System.OriginDateTime

Logging the Execution of Offline Validation Rules

Every time a validation rule is executed offline, the following validation rule logging information automatically writes to the user's activity log, enabling easier debugging of validation rules. 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_vod, Medical_Inquiry_vod):

  • VALIDATION_RULE_BLOCK_START | [ObjectType1, ObjectID1], [ObjectTypeN, ObjectIdN],...
  • VALIDATION_RULE_EXECUTING | [ObjectType1, ObjectId1]
  • VALIDATION_RULE_RULE | [Validation Rule Unique Name1]
  • VALIDATION_RULE_FORMULA_[DEVICE]_PARSED | [Validation Rule Formula1]
  • VALIDATION_RULE_RESULT | [PASS/FAIL]
  • VALIDATION_RULE_EXECUTING | [ObjectTypeN, ObjectIdN]
  • VALIDATION_RULE_RULE | [Validation Rule Unique NameN]
  • VALIDATION_RULE_FORMULA_[DEVICE]_PARSED | [Validation Rule FormulaN]
  • VALIDATION_RULE_RESULT | [PASS/FAIL]
  • VALIDATION_RULE_BLOCK_END