salesforcesoql

How To Get Salesforce Table Names using SOQL


How can I view all the available tables in my Salesforce instance using SOQL? Is it possible to view additional parameters, such as whether the table is queryable, or whether it is customizable?


Solution

  • EntityDefinition is a decent start (experiment with the WHERE clause, there are way more tables even in vanilla SF than you think)

    SELECT KeyPrefix, QualifiedApiName, Label, IsQueryable, IsDeprecatedAndHidden, IsCustomSetting
    FROM EntityDefinition
    WHERE IsCustomizable = true AND IsCustomSetting = false