PicklistEntry Class

Represents a picklist entry.

Schema

Picklist fields contain a list of one or more items from which a user chooses a single item. They display as drop-down lists in the Salesforce user interface. One of the items can be configured as the default item.

A Schema.PicklistEntry object is returned from the field describe result using the getPicklistValues method. For example:

The following are methods for PicklistEntry. All are instance methods.

  • getLabel()

    Returns the display name of this item in the picklist.

  • getValue()

    Returns the value of this item in the picklist.

  • isActive()

    Returns true if this item must be displayed in the drop-down list for the picklist field in the user interface, false otherwise.

  • isDefaultValue()

    Returns true if this item is the default value for the picklist, false otherwise. Only one item in a picklist can be designated as the default.

Returns the display name of this item in the picklist.

public String getLabel()

Type: String

Returns the value of this item in the picklist.

public String getValue()

Type: String

Returns true if this item must be displayed in the drop-down list for the picklist field in the user interface, false otherwise.

public Boolean isActive()

Type: Boolean

Returns true if this item is the default value for the picklist, false otherwise. Only one item in a picklist can be designated as the default.

public Boolean isDefaultValue()

Type: Boolean