Offline Validation Rules

  • CRM Desktop (Windows)
  • CRM Desktop (Mac)
  • iPad
  • iPhone

SFDC Validation rules are supported offline for CRM for iPad and iPhone and on the high performance call report for CRM Desktop (Mac) and CRM Desktop (Windows). Using the standard SFDC Validation Rule editor, data validation logic can be created and synced offline.

Configuring Offline Validation Rules

  1. Ensure the DISABLE_VALIDATION_RULES_vod Veeva Setting in the Custom Settings is not selected. When selected, this setting disables offline validation rules, even if the following configuration steps are completed.
  2. Grant administrators the following permissions:

    Object

    OLS

    Record Type

    Fields

    FLS

    Rule_Object_Header_vod

    CRU

    SFDC_Rule_Object_Header_vod

    All

    Edit

    Rule_Definition_vod

    CRU

    SFDC_Rule_vod

    All

    Edit

    Rule_Message_Translation_vod

    CRU

    SFDC_Rule_Message_Translation_vod

    All

    Edit

    User

    R

    n/a

    Profile_Name_vod

    Read

  3. Grant administrators access to the Validation_Rule_Admin_Console_vod Visualforce Page.
  4. Grant administrators access to the Validation Rule Administration tab.
  5. 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

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

    • Rule_Object_Header_vod
    • Rule_Definition_vod
    • Rule_Message_Translation_vod
  7. Navigate to the Validation Rule Administration tab.
  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_Authorization_vod
  • Account_Plan_vod
  • Account_Tactic_vod
  • Action_Item_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
  • Call2_Sample_vod
  • Call_Objective_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)
  • Event_Attendee_vod
  • 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
  • Order_vod
  • Order_Line_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
  • GEOLOCATION
  • GETSESSIONID
  • HYPERLINK
  • IMAGE
  • PICKLISTCOUNT
  • VLOOKUP

The following Validation Rules Function are supported:

  • Date and Time functions:

    If a date function returns an invalid date, the validation rule is violated and an error message displays.

    • DATE
    • DATEVALUE
    • DATETIMEVALUE
    • DAY
    • MONTH
    • NOW
    • TODAY
    • YEAR
  • Informational functions:
    • BLANKVALUE
    • ISBLANK

      For multi-select picklists, ISBLANK is only supported online.

    • PRIORVALUE
  • Logical functions:
    • AND
    • CASE
    • IF
    • ISCHANGED
    • ISNEW
    • ISNUMBER
    • NOT
    • OR
  • Math functions:
    • ABS
    • CEILING
    • EXP
    • FLOOR
    • LN
    • LOG
    • MAX
    • MIN
    • MOD
    • ROUND
    • SQRT
  • Text functions:
    • BEGINS
    • BR
    • CASESAFEID
    • CONTAINS
    • FIND
    • INCLUDES
    • ISPICKVAL
    • LEFT
    • LEN
    • LOWER
    • LPAD
    • MID
    • RIGHT
    • RPAD
    • SUBSTITUTE
    • TEXT
    • TRIM
    • UPPER
    • VALUE
  • Advanced functions:
    • REGEX
    • ISNULL

      For multi-select picklists, ISNULL is supported online and offline.

    • NULLVALUE

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_EVAL|[PASS/FAIL]
  • VALIDATION_RULE_ERROR|[Error Message]
  • VALIDATION_RULE_BLOCK_END

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 Browser 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.
  • Roll-up fields are not supported in offline validation rules
  • 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