Using VMobile Object Configurations

VMobile Object Configurations (VMOCs) control what objects and records are synced to offline platforms. VMOCs consist of the following main components:

  • Object
  • Device
  • Type
  • WHERE clause

Admins can activate or create VMOCs from the VMobile Object Configurations tab in CRM.

Device

Each VMOC is offline device-specific. For each object to be synced down to mobile platforms, an active VMOC must exist for the relevant Device_vod field.

  • iPad_vod
  • iPhone_vod
  • WinModern_vod

Types of VMOCs

Full Object Sync

Full Object Sync syncs all of the data contained within an object to Veeva CRM Mobile platforms. This type of sync entry is reserved for reference objects, such as the Product Catalog and other lookup objects.

Top Level Sync

Top Level Object Sync is reserved for master objects in Veeva CRM, including Account, Medical Event, and User. The Include Related Objects check box enables the sync process examines the user's page layout for the object and identifies all objects in Related Lists. Any that do not already have a VMOC entry are added to the query and treated as top level objects.

This means there will not be a WHERE clause filtering for those related objects, other than standard visibility of the parent record. The parent's WHERE clause will not filter these objects. This is particularly suited for parent objects with private sharing or similar built-in visibility constraints.

The following objects are typically synced using the Top Level Object Sync setting:

  • Call2_vod
  • User
  • Product_Metrics_vod
  • Account_Plan_vod
  • Address_vod
  • TSF_vod
  • AccountShare
  • Medical_Event_vod
  • Contact

Related to Top Level Sync

VMOCs of this type are queried as sub-queries of the specified parent top level object. Records for this object only sync if they are associated with a parent record that is also synced. VMOCs of this type can also have their own WHERE clauses to further filter records synced.

Child and Parent Row Sync

Used when a child object controls the visibility of the parent. For example, when visibility to a row in the Campaign_vod object is based on visibility to the Campaign_Target_vod object.

Corresponding parent object VMOCs should have a Type of Top Level, with Meta Data Only set to True.

VMOC WHERE Clause

A VMOC’s WHERE clause is used in the SOQL query executed on the online database. It determines which specific records for the corresponding object sync down to the defined device. Any record that satisfies the conditions defined by the WHERE clause is synced. For example, to limit the number of calls synced to only include calls made in the last 90 days, the WHERE clause for the VMOC would be:

WHERE (Account_vod__r.Name !=null OR User_vod__r.Name !=null OR Medical_Event_vod__r.Name !=null OR Contact_vod__r.Name!=null) AND (Status_vod__c = 'Planned_vod' OR (Call_Date_vod__c ›= LAST_N_DAYS:90 AND Call_Date_vod__c ‹= NEXT_N_DAYS:30))

For performance reasons, always use the following WHERE clause for Child_Account_vod VMOCs:

WHERE Parent_Account_vod__c IN (SELECT Id from Account) or WHERE Child_Account_vod__c IN (SELECT Id from Account)

Using Enhanced Sync

Enhanced Sync is a check box that can be enabled for any VMOC. Enhanced Sync VMOCs transfer all newly shared records regardless of the Last Modified By date. All records, corresponding content, and attachments the user no longer has access to are removed in the sync. In contrast, traditional sync updates an object’s records on the device only if the record’s Last Modified By date is after the Last Sync date.

Sync times may be extended by enabling this feature. Only enable this feature for objects that require it.

Considerations

  • Enhanced Sync should be enabled for objects with sharing rules configured
  • The Account object and child objects of Account use Enhanced Sync by default
  • Enable Enhanced Sync when the WHERE clause on an object’s VMOC is updated, or when an object’s sharing model is updated. Disable after all users have synced the change.
  • Do not enable Enhanced Sync in Related to Top Level VMOCs. This extends sync times.
  • In a master-child relationship, admins should enabled Enhanced Sync for each child object
  • VMOCs do not need to be created for object share tables except for certain Account Plan Sharing objects

If a CRM for iPad user loses access to a record referenced via another record, sync errors occur. This behavior exists regardless of whether Enhanced Sync is enabled.

Configuring Enhanced Sync

To enable this feature:

  1. Navigate to the Enable_Enhanced_Sync_vod field on the VMobile_Object_Configuration_vod object.
  2. Select Edit.
  3. Select Active from the Field Usage picklist.
  4. Select Save.
  5. Grant all users FLS edit permission to the Enable_Enhanced_Sync_vod field on the VMobile_Object_Configuration_vod object.
  6. Add the Enable_Enhanced_Sync_vod field to the VMobile_Object_Configuration_vod page layout.
  7. Select the Enable_Enhanced_Sync_vod check box for all appropriate VMOCs.