Newer Version Available

This content describes an older version of this product. View Latest

EntityDefinition

Provides row-based access to metadata about standard and custom objects.

This object is available in API version 32.0 and later.

Supported SOAP Calls

query()

Supported REST HTTP Methods

GET

Fields

Field Details
ApexTriggers
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the Apex triggers associated with this object. Available in Tooling API starting version 34.0.
AssignmentRules
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents assignment rules that allow you to automatically route cases to the appropriate users or queues. Available in Tooling API version 34.0 and later.
AutoResponseRules
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the auto-response rules defined for the object. Available in Tooling API starting version 34.0.
BusinessProcesses
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the business processes defined for the object. Business processes display different picklist values for users based on their profile and associated record type. Available in Tooling API starting version 34.0.
ChildRelationships
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the child relationships defined for the object. Available in Tooling API starting version 34.0.
CompactLayouts
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the compact layouts defined for the object. Available in Tooling API starting version 34.0.
CustomFields
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the custom fields defined for the object. Available in Tooling API starting version 34.0.
DefaultCompactLayout
Type
CompactLayoutInfo
Properties
Create, Nillable, Update
Description
Metadata about the compact layout defined as the default for this object, if any.
DefaultCompactLayoutId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
ID of the default compact layout, if any.
DetailUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
URL to the read-only detail page for this object. Corresponds to the urlDetail field in DescribeSobjectResult. Available in Tooling API starting version 34.0.
DeveloperName
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The developer’s internal name for the custom object (for example “CF_c”).
DurableId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Unique identifier for the field. Always retrieve this value before using it, as the value isn’t guaranteed to stay the same from one release to the next. Use this field to simplify queries.
EditDefinitionUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Available in Tooling API starting version 34.0.
EditUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The URL used when editing the custom entity definition. Corresponds to the urlEdit field on DescribeSobjectResult. Available in Tooling API starting version 34.0.
FieldSets
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the field sets defined for the object.
Fields
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the standard and custom fields defined for this object.
FullName
Type
string
Properties
Create, Group, Nillable
Description
The name of the entity. If a field, the name must specify the parent object, for example Account.FirstName.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
HelpSettingPageName
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the custom help setting page. Available in Tooling API starting version 34.0.
HelpSettingPageUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The URL pointing to the custom help setting page for custom objects. Available in Tooling API starting version 34.0.
IsApexTriggerable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, Apex triggers can be defined for the entity.
IsCompactLayoutable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, the object supports compact layouts. That is, compact layouts can be defined, a system compact layout can be synthesized, or both.
IsCreatable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, records based on the object (true) can be created.
IsCustomizable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, custom fields can be defined for the entity.
IsDeletable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, the object (true) can be deleted.
IsFeedEnabled
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, the Chatter feed is enabled for this object. Available in Tooling API starting version 34.0.
IsQueryable
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, the object can be queried.
IsWorkflowEnabled
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
If true, workflow rules can be defined for the entity.
KeyPrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The first three digits of the entity’s ID, which identify the object type, such as Account or Opportunity.
Label
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The label for this object, used in the compact layout and in the user's language locale.
Layouts
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the layouts defined for this object. Available in Tooling API starting version 34.0.
Limits
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
The limits defined for this object. Corresponds to the Limits page for each standard object in Setup, or the Limits related list for each custom object. Available in Tooling API starting version 34.0.
LookupFilters
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the lookup filters defined for this object. Available in Tooling API starting version 34.0.
MasterLabel
Type
string
Properties
Filter, Group, Sort
Description
The label for this object, which displays in Setup. The master label is in the default language locale for the organization. If there is no default language locale, the label is in en_US.
Metadata
Type
mns: CustomObject
Properties
Create, Nillable, Update
Description
Metadata about the standard or custom object. Details are available in the CustomObject entry in the metadata namespace in the Tooling API WSDL.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values:

  • In Developer Edition organizations, the namespace prefix is set to the namespace prefix of the organization for all objects that support it. There is an exception if an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition organization of the package developer.
  • In organizations that are not Developer Edition organizations, NamespacePrefix is only set for objects that are part of an installed managed package. There is no namespace prefix for all other objects.
Particles
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
The particles defined for this object. Available in Tooling API starting version 34.0.
PluralLabel
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The plural version of the object’s Label.
Publisher
Type
Publisher
Properties
Create, Nillable, Update
Description
The publisher of this object, for example Salesforce, a user, or a package name. Available in Tooling API starting version 34.0.
PublisherId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
ID of the publisher associated with this object. Available in Tooling API starting version 34.0.
QualifiedApiName
Type
string
Properties
Filter, Group, Sort
Description
A unique external ID for the entity of the form NamespacePrefix__DeveloperName for standard objects and NamespacePrefix__DeveloperName__c for custom objects.
QuickActionDefinitions
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the quick actions defined for this object. Available in Tooling API starting version 34.0.
RecordTypes
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the record types defined for this object. Available in Tooling API starting version 34.0.
RelationshipDomains
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Metadata about the relationships with other objects that this object has. Available in Tooling API starting version 34.0.
RunningUserEntityAccess
Type
UserEntityAccess
Properties
Create, Nillable, Update
Description
Represents the running user’s access to this object. Available in Tooling API starting version 34.0.
RunningUserEntityAccessId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
ID of the UserEntityAccess record associated with this object. Available in Tooling API starting version 34.0.
SearchLayouts
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the search layouts associated with this object. Available in Tooling API starting version 34.0.
StandardActions
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the standard actions defined for this object. Available in Tooling API starting version 34.0.
ValidationRules
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the validation rules defined for this object. Available in Tooling API starting version 34.0.
WebLinks
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the Weblinks associated with this object. Available in Tooling API starting version 34.0.
WorkflowAlerts
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the workflow alerts associated with this object. Available in Tooling API starting version 34.0.
WorkflowFieldUpdates
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the workflow field updates for this object. Available in Tooling API starting version 34.0.
WorkflowOutboundMessages
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the workflow outbound messages associated with this object. Available in Tooling API starting version 34.0.
WorkflowTasks
Type
QueryResult
Properties
Filter, Group, Nillable, Sort
Description
Represents the workflow tasks associated with this object. Available in Tooling API starting version 34.0.

SOQL Limitations

This object doesn't support some SOQL operations.

COUNT()
Example Query: SELECT COUNT() FROM EntityDefinition
Error Returned: The "DurableId" field is of type number, but the value from the external data source is "Account.SearchResult". Contact your administrator for help.
GROUP BY
Example Query: SELECT COUNT(qualifiedapiname), isfeedenabled FROM EntityDefinition GROUP BY isfeedenabled
Error Returned: The requested operation is not yet supported by this SObject storage type, contact salesforce.com support for more information.
LIMIT, LIMIT OFFSET
Example Queries:
SELECT qualifiedapiname FROM EntityDefinition LIMIT 5
SELECT qualifiedapiname FROM EntityDefinition LIMIT 5 OFFSET 10
An incorrect result is returned because LIMIT and LIMIT OFFSET are ignored.
NOT
Example Query: SELECT qualifiedapiname FROM EntityDefinition WHERE qualifiedapiname!='Account'
Error Returned: Only equals comparisons permitted
OR
Example Query: SELECT qualifiedapiname, keyprefix FROM EntityDefinition WHERE isdeletable=true OR (isfeedenabled=false AND keyprefix='01j')
Error Returned: Disjunctions not supported