Limits & Validations
The following limits and validation rules are enforced on every FOQL query.
| Rule | Limit |
|---|---|
| Records retrieved per API call | 2,000 |
Joins per query (LOOKUP_FIELD_NAME.fieldName) | 5 |
| Nested join | Supported — lookup_field_1.lookup_field_2.field |
Fields in the order by clause | 10 |
Fields in the group by clause | 4 |
| Aggregate fields per query | 5 |
Criteria conditions in the where clause | 25 |
| Multi-line fields in criteria | Not allowed (e.g. Description, Terms and Conditions, Comments) |
Details#
- 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. - Nested joins — Joins can be nested to reach across multiple modules, in the form
lookup_field_1.lookup_field_2.field. - Record cap — Each API call can retrieve a maximum of 2,000 records.
order by— A maximum of 10 fields can be specified in theorder byclause.group by— A maximum of 4 fields can be specified in thegroup byclause.- Aggregate fields — A maximum of 5 aggregate fields are allowed per query.
wherecriteria — A maximum of 25 criteria conditions are allowed in thewhereclause.- Multi-line fields — Multi-line fields such as Description, Terms and Conditions, and Comments cannot be used in the
wherecriteria.
note
Exceeding any of these limits returns a LIMIT_EXCEEDED error. See Errors.