1

When submitting a SOQL query in the Dev Console using the Tooling API only one result row shows, even though more overall rows are returned, as confirmed by the "Query Results" notice above the returned row.

For example, the query below to find indexed fields on the Account only displays one returned row, but has a "Query Results - Total Rows" of 51.

select id, DataType, NamespacePrefix, DeveloperName from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account' AND IsIndexed = TRUE

The same query delivered through the REST API returns the full expected number of results.

2 Answers 2

1

This appears to be because the Id returned is the same for all FieldDefinition records (no clue why...)

With this modified query:

select DurableId, DataType, NamespacePrefix, DeveloperName from FieldDefinition where EntityDefinition.QualifiedApiName = 'Account' AND IsIndexed = TRUE

you will get all the indexed fields

0

As per support, the Tooling API will only return the first row of a SOQL query by design to avoid potential performance issues. REST API is the recommended way to get multiple rows returned.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .