Skip to main content

Limits & Validations

The following limits and validation rules are enforced on every FOQL query.

RuleLimit
Records retrieved per API call2,000
Joins per query (LOOKUP_FIELD_NAME.fieldName)5
Nested joinSupported — lookup_field_1.lookup_field_2.field
Fields in the order by clause10
Fields in the group by clause4
Aggregate fields per query5
Criteria conditions in the where clause25
Multi-line fields in criteriaNot allowed (e.g. Description, Terms and Conditions, Comments)

Details#

  1. Joins via lookup fields — A join is a lookup-field traversal written as LOOKUP_FIELD_NAME.fieldName (for example, vendor.name). A single query may contain a maximum of 5 such joins.
  2. Nested joins — Joins can be nested to reach across multiple modules, in the form lookup_field_1.lookup_field_2.field.
  3. Record cap — Each API call can retrieve a maximum of 2,000 records.
  4. order by — A maximum of 10 fields can be specified in the order by clause.
  5. group by — A maximum of 4 fields can be specified in the group by clause.
  6. Aggregate fields — A maximum of 5 aggregate fields are allowed per query.
  7. where criteria — A maximum of 25 criteria conditions are allowed in the where clause.
  8. Multi-line fields — Multi-line fields such as Description, Terms and Conditions, and Comments cannot be used in the where criteria.
note

Exceeding any of these limits returns a LIMIT_EXCEEDED error. See Errors.

On This Topic