CustomField

Represents a custom field on a custom object that stores data unique to your organization.

Version 

Introduced in API version 28.0.

Supported SOAP API Calls 

create(), describeSObjects(), query(), retrieve(), search(), update(), upsert()

Supported REST API Methods 

GET, HEAD, PATCH, POST, Query

Fields 

Description 

  • Type: textarea
  • Required: No
  • Properties: Filter, Nillable, Sort

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: The developer’s internal name for the custom field. For example, the internal name for the custom field CF__c is CF.

ElementType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Possible values:

    • Float — Float

    • Text — Text

EntityDefinitionId 

  • Type: string
  • Required: No
  • Properties: Filter, Group, Sort

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Description: The internal name of the object. White spaces and special characters are escaped for validity. The name must:

  • Contain characters, letters, or the underscore (_) character

  • Must start with a letter

  • Can’t end with an underscore

  • Can’t contain two consecutive underscore characters.

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.

InlineHelpText 

  • Type: textarea
  • Required: No
  • Properties: Filter, Nillable, Sort

Length 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

MaskChar 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Possible values:

    • asterisk — asterisk

    • X — X

MaskType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Possible values:

    • all — Mask All Characters

    • creditCard — Credit Card Number

    • ssn — Social Security Number

    • lastFour — Last Four Characters Clear

    • sin — Social Insurance Number

    • nino — National Insurance Number

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Description: CustomFieldMetadata includes these fields. For more information, see CustomField in the Metadata API Developer Guide.

  • caseSensitive

  • complianceGroup

  • defaultValue

  • deleteConstraint

  • deprecated*

  • description

  • displayFormat

  • displayLocationInDecimal

  • elementType*

  • escapeMarkup

  • externalDeveloperName

  • externalId

  • formula

  • formulaTreatBlanksAs

  • inlineHelpText

  • isAIPredictionField

  • isFilteringDisabled

  • isNameField

  • isSortingDisabled

  • label

  • length

  • maskChar

  • maskType

  • picklist

  • populateExistingRows

  • precision

  • readOnlyProxy

  • referenceTo

  • relationshipLabel

  • relationshipName

  • relationshipOrder

  • reparentableMasterDetai

  • required

  • restrictedAdminField

  • scale

  • startingNumber

  • stripMarkup

  • summarizedField

  • summaryFilterItems

  • summaryForeignKey

  • summaryOperation

  • trackFeedHistory

  • trackHistory

  • type

  • unique

  • visibleLines

  • writeRequiresMasterRead

  • Reserved for future use.

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

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace of the custom field. A custom field can be in an extension namespace different than the object.

Precision 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort

RelationshipLabel 

  • Type: string
  • Required: No
  • Properties: Filter, Group, Nillable, Sort

Scale 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort

SummaryOperation 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Possible values:

    • count — COUNT

    • sum — SUM

    • min — MIN

    • max — MAX

TableEnumOrId 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: The enum (for example, Account) or ID of the object this field is on.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!