Table of Contents


Entity Metadata

Using the entity metadata, you can describe an Entity and access its properties, such as entity labels, settings and their fields. Using the "Describe" method, you can also access field details such as picklist values and more.

 

Accessing Metadata

To access Entity metadata, use one of the following methods:

// DiscribeEntity<T> where T is the name of the Entity, e.g:
var metadata = dbObject.DescribeEntity<Account>();

// You can also ask the system to describe an Entity dynamically
var metadata = dbObject.DescribeEntity("Account");

The above sample describes an entity using the current user's permission. Therefore, it would not return fields that the user does not have access to view. If you wish to retrieve the entity details in system mode (where end-user's permissions are ignored), you use the following methods:

// DiscribeEntity<T> where T is the name of the Entity, e.g:
var metadata = dbObject.DescribeEntity<Account>(true);

// You can also ask the system to describe an Entity dynamically
var metadata = dbObject.DescribeEntity("Account", true);


 

Entity Metadata Properties

PropertyProperty TypeNotes
IdstringEntity record ID
NamestringEntity API Name
LabelstringTranslated to the current user's preferred language
PluralLabelstringTranslated to the current user's preferred language
KeyPrefixstringThe prefix used for creating an entity's Record IDs
TracksFeedsboolStatus of social feeds for this entity
AllowReportsbool 
TrackActivitiesbool 
FieldsList<EntityFieldMetadata>List of fields of the entity
RelationshipsList<EntityRelationshipMetadata>Relationships are other entities that reference this entity

 

Entity Field Metadata Properties

PropertyProperty Type 
IdstringThe unique identifier for the field within the system.
NamestringThe API/programmatic name of the field used in queries and data operations.
LabelstringThe user-friendly display name of the field, translated to the current user's preferred language.
IsKeyboolIndicates whether this field is the primary key of the entity
IsSearchableboolIndicates whether the field is indexed and can be used in search operations.
IsReadableboolIndicates whether the current user has permission to view this field's value.
IsReferenceboolIndicates whether this field is a lookup/master-detail field that points to another entity.
IsAuditFieldboolIndicates whether this is a system audit field (e.g., CreatedOn, ModifiedOn, CreatedById, ModifiedById).
IsReadOnlyboolIndicates whether the field is read-only and cannot be modified by users.
IsRequiredboolIndicates whether a value must be provided for this field when creating or updating records.
IsExternalIdboolIndicates whether this field can be used as an external identifier for upsert operations and integrations with external systems.
IsCalculatedboolIndicates whether this is a computed field whose value is derived automatically (formula, rollup summary, or calculated field). Calculated fields are always read-only.
IsNameFieldboolIndicates whether this field serves as the primary display name for records of this entity.
IsCustomFieldboolIndicates whether this is a custom field created by an administrator, as opposed to a standard system field.
ReferenceFieldstringFor lookup or master-detail fields, the name of the navigation property that provides access to the related entity's data. Use this to access fields from the related entity (e.g., {ReferenceField}.Name).
IsAuditedboolIndicates whether changes to this field are tracked in the audit history.
IsSortableboolIndicates whether query results can be sorted by this field.
IsFilterableboolIndicates whether this field can be used in filter or WHERE conditions.
IsUniqueboolIndicates whether this field has a unique constraint, preventing duplicate values across records.
IsHtmlboolIndicates whether the field contains HTML/rich text content that should be rendered as formatted HTML.
LengthintThe maximum character length allowed for text fields and the number of whole digits for numeric or currency fields.
PrecisionintThe number of decimal places for numeric fields (currency, decimal, percentage).
IsDepedentPicklistboolIndicates whether the available values for this picklist depend on the selected value of another controlling field.
ControllerNamestringFor dependent picklists, the name of the controlling field that determines which values are available in this picklist.
PicklistEntriesList<PicklistEntry>The list of available values for picklist/dropdown fields. Each entry includes a label (display text), value (stored value), optional color, and default value indicator.

 

Picklist Entry Properties

PropertyProperty TypeNotes
LabelstringTranslated to the current user's preferred language
ValuestringThe actual value that should be stored in the database.
ExternalValuestringUnique identifier of the picklist in an external system.
IsDefaultValueboolIf this value should be set as the default value.
ColorstringHEX color value (e.g: #336699)
IsDecisionboolUsed in special cases where a picklist value requires additional meaning—for example, identifying whether an opportunity stage represents a closed opportunity.



Accessing Record Type Metadata

You can request metadata to load additional information related to Record Types.
This data is not loaded by default due to performance considerations and should only be requested when needed.

var metadata = dbObject.DescribeEntity<Account>(true);

// Loads the additional Record Type metadata for this entity.
metadata.LoadRecordTypeMetadata();


Record Types Metadata Properties

PropertyProperty TypeNotes
IdstringUnique ID of Record Type
NamestringName of the Record Type
DescriptionstringRecord Type's description
IsActiveboolRecord Type status
ExternalIdstringThe ID of the Record Type in an external system
RecordTypePicklistSettingsobject[]An array of objects for different Picklist fields for this Record Type


Record Type Picklist Settings Metadata Properties

PropertyProperty TypeNotes
IdstringSettings' unique ID
EntityFieldstringName of the picklist field
Valuesstring[]An array of string picklist values that apply to this Record Type
DefaultValuestringDefault value specified for this Record Type


Accessing Dependent Picklist Metadata

You may optionally request metadata for Dependent Picklist values for advanced component development or other specialized requirements. This metadata is not always included when calling the Describe method and must be explicitly requested.

var metadata = dbObject.DescribeEntity<Account>(true);

// Load dependent picklist values
metadata.LoadDepedentPicklistValues();


The Entity Field Metadata property IsDependentPicklist indicates whether a picklist depends on a controlling field, such as a checkbox or another picklist. The ControllerName property identifies the controlling field.

When dependent picklist metadata is loaded, a new object called DependentPicklists is added to the field metadata for fields where IsDependentPicklist is set to true. This object maps each parent (controlling) picklist value to the list of valid child picklist values.

Below is an example showing that when the controlling value is “Type value 1”, only “Open” and “In Progress” are valid child values:

{
    "Id": "7NX0000000007MQ0000",
    "Name": "Status",
    "Label": "Status",
    "FieldType": "Picklist",
    "IsDependentPicklist": true,
    "ControllerName": "Type"
    ...
    "DependentPicklists": {
       "Type value 1": [
          {
              "Id": "7O0000000000hIA0000",
              "Label": "Open (New)",
              "Value": "Open",
              ...
          },
          {
             "Id": "7O0000000000hIA0000",
             "Label": "In Progress",
             "Value": "In Progress",
             ...
          }
       ]
    }
}


Dependent Picklists Properties

PropertyProperty TypeNotes
IdstringUnique identifier for the Picklist value.
LabelstringLabel of the picklist (differs based on user's language settings)
ValuestringValue of the picklist (as it is stored in the database)
ExternalValuestringUnique identifier of the picklist in an external system.
IsDefaultValueboolIf this value should be set as the default value.
ColorstringColor associated with this picklist value
IsDecisionboolUsed in special cases where a picklist value requires additional meaning—for example, identifying whether an opportunity stage represents a closed opportunity.
IsDecision2boolUsed in special cases where a picklist value carries additional meaning—for example, indicating whether an opportunity stage represents a won opportunity.



 

Last updated on 12/17/2025

Attachments