Salesforce Error "Too Many Fields Detected: Size Cannot Be Less Than or Equal to Zero"

  • Updated


If Riva Cloud or Riva On-Premise stops syncing contacts, an error similar to the following sample may occur:

2016-03-22 07:08:16,040  INFO [CTP-vlk #3944] [442FON84RKR4] (CRM -> Exchange) Synchronizing Contacts
2016-03-22 07:08:16,040  INFO [CTP-vlk #3944] [442FON84RKR4] Starting Sync: CO to XOM
2016-03-22 07:08:16,040  INFO [CTP-vlk #3944] [442FON84RKR4] TargetKnowledge [XOM] (CC,1155), (CO,117643), (XC,119)
2016-03-22 07:08:16,040  INFO [CTP-vlk #3944] [442FON84RKR4] SourceKnowledge [CO] (CO,329745), (CC,160), (XC,119)
2016-03-22 07:08:29,394 ERROR [CTP-vlk #3944] [442FON84RKR4] [CL: x74d2bf51116eee46; M:x227d3dad3a0d8f7b] Too many fields detected
2016-03-22 07:08:29,394 ERROR [CTP-vlk #3944] [442FON84RKR4] Size cannot be less than or equal to zero
Parameter name: size
System.ArgumentOutOfRangeException: Size cannot be less than or equal to zero
Parameter name: size
2016-03-22 07:08:29,394  INFO [CTP-vlk #3944] [442FON84RKR4] [CC] Polling for changes [?]
2016-03-22 07:08:29,597  INFO [CTP-vlk #3944] [442FON84RKR4] [CC] Reference poll disabled. Skipping.



When Riva first connects to Salesforce, Riva determines a list of available fields including custom fields that should be queried based on form views for various modules. Often, Riva detects custom fields for the contacts module.

In the above example, when Riva queried to sync contacts, it discovered that more fields were defined in the Riva connection than existed in Salesforce for the contacts module. That produced the "Too many fields" error. Usually this error is caused when someone modifies a module form and removes one or more custom fields.


Clear the invalid custom fields from the Riva Salesforce connection.

Implementation for Riva Cloud

Implementation for Riva On-Premise

To clear the invalid custom fields from the Riva Salesforce connection:

  1. In the Riva Manager application, on the menu bar, select Setup.

  2. Double-click the Salesforce connection.

  3. On the Object Definition page, select Contact from the Object Type drop-down list.

    Riva populates a list of previously detected fields for Salesforce contacts. Custom fields are normally located at the bottom of the list.

  4. Examine the list, and remove custom fields that are no longer being used.

  5. Save the Salesforce connection.

  6. During the next sync cycle, confirm that contacts sync as expected with no errors.

Applies to

  • Riva Cloud for Salesforce.
  • Riva On-Premise for Salesforce.

Was this article helpful?




Please sign in to leave a comment.