Skip to main content

KI-131

Created date11/19/2024Updated date05/27/2025
StatusDoneRelated work itemMIC-3918
DescriptionSome searches in Account Search might throw the following error: Aggregate query has too many rows for direct assignment, use FOR loop This is due to a Salesforce query limitation when querying large numbers of related records. Salesforce describes this in the following two Knowledge articles: - Aggregate query has too many rows for direct assignment but less than 200 rows - 'Aggregate query has too many rows for direct assignment, use FOR loop' error This happens in when both of the following are true: 1. There are long or rich text fields in the account query and 2. Any single account in the search results has more than 200 Contact Information or 200 Affiliation records related to it
Affects version(s)V14, V14.1, V15Impacted capabilities
Steps to reproduce1. Perform an account search using Account Search V3, where over 200 Contact Information or Affiliation records are returned.
WorkaroundThere are two possible workarounds for this issue: 1. Make sure accounts do not have more than 200 Contact Information records or affiliated to more than 200 other accounts. 2. Remove user FLS to all long text and rich text fields on the following objects: - Account - Contact - Contact Information - Affiliation
Fix versionV16Resolution notesN/A