When performing a synchronization with Veeva CRM offline application, the user receives Sync Failed error message. The Activity Log of the user shows the below error for the impacted object, e.g. for Affiliation_vod__c:
|Online||Sync Server Error||Affiliation_vod__c||Your query request was running for too long.|
One of the WHERE clauses implemented in the VMobile Object Configuration (VMOC) record for an object, either for the profile of the user or at Org level, is generating a query which is timing out on the Salesforce server. Salesforce limits query execution to a maximum of 2 minutes.
To receive information regarding the amount of data that is running the query against, please follow these steps when logged-in as a System Administrator:
- Navigate to: Setup --> Administration Setup --> Data Management -->Storage Usage.
- Refine the filtering criteria to reduce the amount of data and execution of the query.
- Reduce the complexity of the query.
- Before implementing any changes in the VMOC records, run the query either in the Developer Console or using Salesforce Workbench. The query time differs when run as a System Administrator or end-user (part of the query time is spent working the field level security).