EntityParticle

Represents each element of a field that can be presented in a user interface. Contrast EntityParticle with FieldDefinition, which represents each element of a field defined in the Metadata API

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

EntityParticle fields are exposed in SOAP API version 45.0 and later. You can use Tooling API to query for EntityParticle fields in guest user mode in API version 44.0 and earlier. In API version 45.0 and later, use SOAP API to get this data in guest user mode. EntityParticle is still exposed in Tooling API to User Profiles with the ViewSetup permission.

Note

Version 

Introduced in API version 34.0.

Supported SOAP API Calls 

describeSObjects(), query()

Supported REST API Methods 

Query

Limitations 

SOQL Limitations

SOSL Limitations

Fields 

ByteLength 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: The maximum length of the field represented by this EntityParticle, in bytes.

DataType 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Data type of the field, for example textarea or datetime. The values are defined similar to the values in the user interface, not the corresponding API data type names.

For example, from an object, retrieve all the fields of one data type.

1SELECT DataType, QualifiedApiName
2FROM EntityParticle
3WHERE DataType = 'phone' AND
4 EntityDefinition.QualifiedApiName = 'Account'

DefaultValueFormula 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: The default value specified for the field when a formula isn’t specified. If no default value is specified, this field isn’t returned.

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s org. Label is Record Type Name.

Digits 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Maximum number of digits for a field of type int. If an integer value exceeds the number of digits, the API returns an error.

DurableId 

  • Type: string

  • Required: No

  • 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. To simplify queries, use this field.

EntityDefinitionId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The ID for the object defined in the DurableId field.

ExtraTypeInfo 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 34.0

  • Description: Represents further definition of a type.

  • For type textarea:

  • plaintextarea

  • richtextarea

  • For type URL:

  • image

  • For type reference:

  • externallookup

  • indirectlookup

  • For Account:

  • switchablepersonname

  • personname

FieldDefinitionId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: ID of the field definition associated with this EntityParticle.

InlineHelpText 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Represents the content of field-level help. Available in Tooling API starting version 35.0.

IsApiFilterable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field represented by this EntityParticle can be specified in the WHERE clause of a query string.

  • Default value: false

IsApiGroupable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field represented by this EntityParticle can be included in the GROUP BY clause of a SOQL query.

  • Default value: false

IsApiSortable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, a query can sort on the field represented by this EntityParticle.

  • Default value: false

IsAutonumber 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Default value: false

IsCalculated 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field represented by this EntityParticle is calculated.

  • Default value: false

IsCaseSensitive 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field represented by this EntityParticle is case sensitive. Available in Tooling API starting version 35.0.

  • Default value: false

IsCompactLayoutable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field can be included in a compact layout.

  • Default value: false

IsComponent 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 38.0

  • Description: If true, the field is a component of a compound field. The default value is false. Available in Tooling API starting version 40.0.

  • Default value: false

IsCompound 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 38.0

  • Description: If true, the field is a compound of other fields. The default value is false. Available in Tooling API starting version 38.0.

  • Default value: false

IsCreatable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, a value for the field represented by this EntityParticle can be created. Available in Tooling API starting version 35.0.

  • Default value: false

IsDefaultedOnCreate 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, and if no other value is supplied, a default value is applied when the record is created. Available in Tooling API starting version 35.0.

  • Default value: false

IsDependentPicklist 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field is a dependent picklist. Available in Tooling API starting version 35.0.

  • Default value: false

IsDeprecatedAndHidden 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: Reserved for future use.

  • Default value: false

IsDisplayLocationInDecimal 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, and if the field represented by this EntityParticle is a Geolocation custom field, the value appears in decimal notation. If false, the value appears as degrees, minutes, and seconds. Available in Tooling API starting version 35.0.

  • Default value: false

IsEncrypted 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field is marked for Classic Encryption. Available in Tooling API starting version 35.0.

  • Default value: false

IsFieldHistoryTracked 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field’s history can be tracked.

  • Default value: false

IsHighScaleNumber 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: Indicates whether the field stores numbers to eight decimal places regardless of what’s specified in the field details (true) or not (false). Used to handle currencies for products that cost fractions of a cent, in large quantities. If high-scale unit pricing isn’t enabled in your org, this field isn’t returned.

  • Default value: false

IsHtmlFormatted 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Default value: false

IsIdLookup 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, you can use the field to specify a record for upsert. Available in Tooling API starting version 35.0.

  • Default value: false

IsLayoutable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field can be assigned to a layout. Available in Tooling API starting version 35.0.

  • Default value: false

IsListVisible 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field can be included in a related list.

  • Default value: false

IsNameField 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field is a name field.

  • Default value: false

IsNamePointing 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field represents a polymorphic relationship. Determine the object type at runtime for dynamic queries when this value is true. Available in Tooling API starting version 35.0.

  • Default value: false

IsNillable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field can be left out of queries on the object.

  • Default value: false

IsPermissionable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, you can specify field permissions for the field. Available in Tooling API starting version 35.0.

  • Default value: false

IsUnique 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, the field is unique. Available in Tooling API starting version 35.0.

  • Default value: false

IsUpdatable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, you can update the field. Available in Tooling API starting version 35.0.

  • Default value: false

IsWorkflowFilterable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If true, the field can be filtered for a workflow.

  • Default value: false

IsWriteRequiresMasterRead 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: If true, writing to the detail object requires read sharing instead of read-write sharing of the parent. Available in Tooling API starting version 35.0.

  • Default value: false

Label 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The label that corresponds to the field in the user interface. If the label has translations, the label returned is in the user’s language.

Length 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The maximum number of bytes available to store the value in the field represented by this EntityParticle.

Mask 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Reserved for future use.

MaskType 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Reserved for future use.

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Primary label for this object. This display value is the internal label that isn’t translated. Limit: 40 characters.

Name 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Name of the object for the field represented by this EntityParticle.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace prefix associated with this object. Each Developer Edition org 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 these values:

  • In a Developer Edition org, the namespace prefix is set to the namespace prefix of the org for all objects that support it. There’s 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 org of the package developer.
  • In an org other than a Developer Edition org, NamespacePrefix is only set for objects that are part of an installed managed package. There’s no namespace prefix for all other objects.

Precision 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The maximum number of digits allowed for the field represented by this EntityParticle.

QualifiedApiName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: A unique external name for the field.

ReferenceTargetField 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: Specifies the custom field on the parent object to match against this indirect lookup relationship field, whose values come from an external data source. The specified custom field on the parent object must have both IsIdLookup and IsUnique set to true.

ReferenceTo 

  • Type: complexvalue

  • Required: No

  • Properties: Nillable

  • Introduced: API version 35.0

  • Description: The array of values in this field represents the possible object types of the referenced objects. For example, if EntityParticle represents a field on Events, the values are Contact, Lead, and custom objects with a relationship to Events.

RelationshipName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: If the field represented by this EntityParticle is a master-detail relationship field, this field’s value is the relationship name.

RelationshipOrder 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: A value of 0 represents a primary relationship, and a value of 1 represents a secondary relationship. This field is relevant only for relationship fields.

Scale 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The number of digits to the right of the decimal in an integer. For example, 3.00 has a scale of 2.

ValueTypeId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description: ID of the value type, if any, for the field represented by this EntityParticle.

RelationshipReferenceTo Type 

Represents the set of objects that this EntityParticle can have a relationship with.

FieldTypeDetails
referenceTostring[]The name of an object that can be referenced. For example, if EntityParticle represents Event.WhoId (the WhoId field on Event), the value of this field would be at least [Contact, Lead].

Usage 

When querying or searching the EntityParticle object, you must filter using this syntax: WHERE EntityDefinition.QualifiedApiName ='[ObjectAPIName]'

Example Query:

1SELECT EntityDefinitionId, QualifiedAPIName, FieldDefinitionId 
2FROM EntityParticle 
3WHERE EntityDefinition.QualifiedApiName ='Case'

Example Query: Retrieve All Account Fields

1SELECT DataType, FieldDefinition.QualifiedApiName 
2FROM EntityParticle 
3WHERE EntityDefinition.QualifiedApiName ='Account'

Example Query: Find Parent Object Types

Some fields can have more than one type of object in a relationship (polymorphic). For example, Task and Event can have relationships with Contact or Lead.

Use this query to retrieve a list of objects that can have a relationship with Event.WhoId (represented by EntityParticle).

1SELECT QualifiedApiName, RelationshipName, ReferenceTo, ReferenceTargetField 
2FROM EntityParticle
3WHERE EntityDefinition.QualifiedApiName = 'Event' AND QualifiedApiName = 'WhoId'