Applies to
- Riva Cloud and
- Riva On-Premise 2.4.42.
Issue
Microsoft Dynamics CRM throws the exception "Number of conditions in query exceeded the maximum limit. [8004430C]".
Cause
A query to Dynamics CRM has exceeded the maximum number of query conditions allowed by Dynamics CRM. By default, this is 500.
The maximum number of conditions can be exceeded when the sync is configured to do contact or user matching for emails and there are many recipients.
Solution for Riva Cloud
Solution for Riva On-Premise
-
Apply the following advanced option to the CRM connection.
Sync.MsCrm.MaxNumberOfQueryCondition = n,
where n is the maximum number of conditions that your Dynamics CRM instance is configured for.
If a query has more than n conditions, it is split into multiple queries, so that each query has fewer than n conditions. When the sync process has obtained responses to all the queries, it combines all of the queries' results and continues the sync.