Skip to main content

KI-131

Account Search throws “Aggregate Query” error

Created date

11/19/2024

Updated date

11/19/2024

Status

Backlog

Related work item

MIC-3918

Description

Some 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:

This happens in Medical Information Cloud 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, V15

Impacted capabilities

Medical Information Cloud Inquiry Management

Steps to reproduce

  • Perform an account search using Account Search V3, where over 200 Contact Information or Affiliation records are returned.

Workaround

There 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 version

N/A

Resolution notes

N/A