Overview:
An error occurs when some users open the Account View in CRM Online: SOQL statements cannot exceed 20,000 characters. Remove columns and/or criteria from view to reduce statement size.
Root Cause:
The size of the Salesforce.com query cannot exceed 20,000 characters. This is usually because the user has access to too many Territories and the concatenated list is too long.
Solution:
There is a Veeva Setting, DISABLE_RM_QUERY, which prevents a view from executing for a Territory with too many levels. It has a Boolean value:
- true = Only run the view for a Territory that is, at most, one level deep.
- false = (Default) Runs as normal.
If DISABLE_RM_QUERY is disabled (unchecked) and the SOQL query behind the view exceeds the 20,000 character limit defined by Salesforce, then the view is not loaded and a message is displayed: SOQL Statements cannot exceed 20,000 characters.
The Administrator can consider enabling this setting.
Related Documentation:
Salesforce Documentation: Execution Governors and Limits
Send us your feedback: We are always looking for feedback to help improve our Knowledge Base! Please let us know if this article is helpful or provide feedback on how we can improve your experience by clicking here.