Querying Tooling Tables
Querying Tooling Tables
Salesforce provides specialized tables, known as tooling tables, through the Salesforce Tooling API. These tables enable you to access and query Salesforce metadata directly.
The following example queries use tooling tables to return Salesforce metadata:
SELECT * FROM Cdata2.cdata.salesforce.EntityDefinition WHERE QualifiedApiName like 'Account%'
SELECT * FROM Cdata2.cdata.salesforce.FieldDefinition WHERE EntityDefinitionId = 'Account'
SELECT * FROM Cdata2.cdata.salesforce.EntityParticle WHERE EntityDefinitionId = 'Account'
SELECT * FROM Cdata2.cdata.salesforce.Relationshipdomain WHERE ParentsObjectid = 'Account'
For more information about the Salesforce Tooling API, see Tooling API Objects in the Salesforce developer documentation.