Field

A field's metadata.

Where possible, we changed noninclusive terms to align with our company value of Equality. Because changing the often-used term master-detail can break customer implementations, we maintained this reference.

Important

Property Name Type Description Filter Group and Version Available Version
apiName String The API name for this field. Small, 41.0 41.0
calculated Boolean Indicates whether the field is a custom formula field. Small, 41.0 41.0
compound Boolean Indicates whether the field is a top-level compound field.

If the dataType is Location, this value is usually false.

Small, 41.0 41.0
compoundComponentName String If this field is a component field of a compound field, the value is the normalized component name, otherwise the value is null. For example, if the field represents "BillingStreet" of an Address compound field, this property contains "Street". Small, 41.0 41.0
compoundFieldName String If this field is a component field of a compound field, this property contains the top-level compound field. Otherwise, the value of this property is null. Small, 41.0 41.0
controllerName String If this field is a dependent picklist, this property is the name of the field that controls the values of the picklist. Small, 41.0 41.0
controllingFields String[] If this field is a dependent picklist, this property is a collection of fields that control the values in the picklist. When there’s a hierarchy of controlling fields, the collection starts with the immediate parent and moves up the tree.
createable Boolean Indicates whether the field can be created. Small, 41.0 41.0
custom Boolean Indicates whether the field is custom. Small, 41.0 41.0
dataType String Field type. One of these values: Small, 41.0 41.0
externalId String External ID of the field. Small, 60.0 60.0
extraTypeInfo String More data type information. One of these values:
  • ExternalLookup—External lookup
  • ImageUrl—Image url
  • IndirectLookup—Indirect lookup
  • PersonName—Person name
  • PlainTextArea—Plain text area
  • RichTextArea—Rich text area
  • SwitchablePersonName—Switchable person name
Small, 41.0 41.0
filterable Boolean Indicates whether the field is filterable. If true, then this field can be specified in the WHERE clause of a SOQL statement. Small, 41.0 41.0
filteredLookupInfo Filtered Lookup Info If the field is a reference field type with a lookup filter, this value contains the lookup information. Small, 41.0 41.0
highScaleNumber Boolean Indicates whether the field stores numbers to 8 decimal places regardless of what's specified in the field details. Small, 41.0 41.0
htmlFormatted Boolean Indicates whether the field has been formatted for HTML and should be encoded for display in HTML. Also indicates whether a field is a custom formula field that has an IMAGE text function. Small, 41.0 41.0
inlineHelpText String The text that displays in the field-level help hover text. Medium, 41.0 41.0
label String Text label that is displayed next to the field in the Salesforce user interface. This label may be localized. Small, 41.0 41.0
length Integer For string fields, the maximum size of the field in number of Unicode characters (not bytes). Small, 41.0 41.0
maskType String Mask type of the field. Small, 60.0 60.0
nameField Boolean Indicates whether the field is a name field. Small, 41.0 41.0
polymorphicForeignKey Boolean Indicates whether the field is a foreign key over a domain of multiple objects. Small, 41.0 41.0
precision Integer For double fields, indicates the maximum number of digits that can be stored, on both sides of the decimal point. Small, 41.0 41.0
reference Boolean Indicates whether the field is a foreign key to another record.

A reference field contains an Id value that points to a unique record (usually the parent record) on another object.

Small, 41.0 41.0
referenceTargetField String For indirect lookup relationships on external objects, this property is the target custom field of the referenced object. Medium, 41.0 41.0
referenceToInfos Reference to Info[] For fields that refer to other objects, this list includes information about the object types and name fields of the referenced objects. Small, 41.0 41.0
relationshipName String The name of the relationship, if this relationship is a master-detail relationship field. Small, 41.0 41.0
required Boolean Indicates whether the field is required when creating or editing a record.

To determine which fields are required in a layout, use the RecordLayoutItem.required property.

Small, 41.0 41.0
scale Integer For double fields, indicates the number of digits to the right of the decimal point. Small, 41.0 41.0
searchPrefilterable Boolean Indicates whether a foreign key (relationship field) can be included in a SOSL WHERE clause. Big, 41.0 41.0
sortable Boolean Indicates whether the field is sortable. If true, then this field can be specified in a SOQL ORDER BY clause. Small, 41.0 41.0
unique Boolean Indicates whether a field��s value must be unique. Small, 41.0 41.0
updateable Boolean Indicates whether the field can be edited. Small, 41.0 41.0