The online Trailblazer Community is now read-only. [Read the FAQ] [Get Help]
Two Tooling API objects, EntityDefinition and FieldDefinition, have some SOSL limitations. ExternalString and MetadataComponentDependency (Beta) don’t support SOSL searches.
EntityDefinition and FieldDefinition support the following SOSL operations:
FIND
Literal text search, for example:
1FIND {account}Text search with a single wildcard, for example:
1FIND {account*} RETURNING EntityDefinition
2FIND {account?} RETURNING FieldDefinition
3FIND {account*fax} RETURNING EntityDefintion
4FIND {account?fax} RETURNING FieldDefinitionThe wildcard can’t be the first character in a search term, consistent with search behavior for all objects.
Quotation marks are supported.
The escape character \ (slash) is supported. For example, to search for the character * (asterisk), include the escape character:
1FIND {account\*}
2RETURNING EntityDefinitionRETURNING is required.
1FIND {MyString}
2RETURNING FieldDefinitionMultiple object type names are supported.
1...RETURNING EntityDefinition, FieldDefinitionA field list is supported.
1... RETURNING EntityDefinition (MasterLabel, QualifiedApiName)WHERE is supported, though logical operators are not.
LIMIT is supported.
Example:
1FIND {account*}
2RETURNING FieldDefinition (MasterLabel, NamespacePrefix
3WHERE EntityDefinitionId='Account')All other SOSL operations are unsupported. If you include an unsupported expression in a search term, the expression is ignored, except for the following, which cause an error:
ExternalString doesn’t support SOSL searches.
MetadataComponentDependency is a virtual entity, so it doesn’t support SOSL searches.