Metadata Field Types

These field types extend the field types described in the Salesforce Object Reference.

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

Field Type Objects What the Field Contains
CustomField Custom object

Custom field

Represents a custom field.
DeleteConstraint Custom field A string that represents deletion options for lookup relationships. Valid values are:
  • SetNull
  • Restrict
  • Cascade
DeploymentStatus Custom object

Custom field

A string which represents the deployment status of a custom object or field. Valid values are:

  • InDevelopment
  • Deployed
FieldType Custom field Indicates the type of a custom field. Valid values are:
  • Address (beta)
  • AutoNumber
  • Lookup
  • MasterDetail
  • MetadataRelationship
  • Checkbox
  • Currency
  • Date
  • DateTime
  • Email
  • EncryptedText

    This page is about Classic Encryption, not Shield Platform Encryption. What's the difference?

    Note

  • ExternalLookup
  • IndirectLookup
  • Number1
  • Percent
  • Phone
  • Picklist
  • MultiselectPicklist
  • Summary
  • Text
  • TextArea
  • LongTextArea
  • Url
  • Hierarchy
  • File
  • Html
  • Location (use for geolocation fields)
  • Time
1 A Number custom field is internally represented as a field of type double. Setting the scale of the Number field to 0 gives you a double that behaves like an int.
Gender Custom object Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender. Valid values are:
  • Masculine
  • Feminine
  • Neuter
  • AnimateMasculine (Slavic languages—currently Czech, Polish, Russian, Slovak, Slovenian, and Ukrainian)
  • ClassI, ClassIII, ClassV, ClassVII, ClassIX, ClassXI, ClassXIV, ClassXV, ClassXVI, ClassXVII, ClassXVIII (African languages—currently Afrikaans, Xhosa, and Zulu)

The following genders are displayed on the Rename Tabs and Labels page in Setup but are stored internally as “Feminine”. When setting them through the Metadata API, use “Feminine”.

  • Euter (Swedish)
  • Common (Dutch)

Note

Picklist (Including Dependent Picklist) Custom field (This field type isn’t used in Metadata API. CustomField includes this field type for Tooling API support). Represents a picklist, a set of labels and values that can be selected from a picklist.
SharingModel Custom object Represents the sharing model for the custom object. Depending on the object, valid values are:
  • Private
  • Read
  • ReadWrite
  • ReadWriteTransfer
  • FullAccess
  • ControlledByParent
  • ControlledByCampaign
  • ControlledByLeadOrContact

For example, the User object supports Private and Read values. Accounts, opportunities, and custom objects support Private, Read and ReadWrite values. Campaign members support ControlledByCampaign and ControlledByLeadOrContact.

StartsWith Custom object

Custom field

Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. Valid values are:
  • Consonant
  • Vowel
  • Special (for nouns starting with z, or s plus consonants)
TreatBlanksAs Custom field Indicates how blanks should be treated. Valid values are:
  • BlankAsBlank
  • BlankAsZero
ValueSet Custom field Represents a set of values that can be selected from a custom picklist field. Defines the valueSet of a custom picklist field.

ValueSet

Represents a set of values that can be selected from a custom picklist field. Defines the valueSet of a custom picklist field.
Field Type Field Type Description
controllingField string The fullname of the controlling field if this is a dependent picklist. A controlling field can be a checkbox or picklist field, but in this case it’s a picklist. The controlling picklist filters the available values in the dependent picklist.
restricted boolean Whether the picklist’s values are limited to only the values defined by a Salesforce admin. Values are true or false.
valueSetDefinition ValueSetValuesDefinition Defines value-specific settings for a custom dependent picklist. Indicates whether the value set of the custom picklist field is sorted alphabetically.
valueSetName string The masterLabel of the global value set to be used for this picklist field.
valueSettings ValueSettings Used for the settings that describe a value in a custom picklist field. The picklist can have its own unique value set, or inherit the values from a global value set. You can add field dependency values via Metadata API but not remove them.

ValueSetValuesDefinition

Field Name Field Type Description
sorted boolean Whether the picklist’s value set is displayed in alphabetical order in the user interface.
value CustomValue Required. The list of values for this local, custom picklist.

ValueSettings

Field Name Field Type Description
controllingFieldValue stringstring[] Applies only to dependent custom picklists. A list of values in the controlling or parent picklist (that the custom picklist values depend on). You can add field dependency values via Metadata API but not remove them.
valueName string Defines the values in the custom dependent picklist.