CustomValue

Represents the definition of a value used in a global value set or local custom picklist. Custom picklist fields can be local and unique, or can inherit their values from a global picklist (called a global value set in API version 38.0).

To deactivate a global picklist value, you can invoke an update() call on GlobalPicklist (API version 37.0) or GlobalValueSet (API version 38.0 and later) with the value omitted, or with the value’s isActive field set to false. Or, you can invoke an update() call directly on GlobalPicklistValue (API version 37.0) or CustomValue (API version 38.0 and later) with the isActive field set to false.

If picklist values are missing from a component definition, they get deactivated when deployed. Deactivation occurs for picklist values of both standard and custom fields.

Note

CustomValue doesn’t support file-based operations and only supports CRUD-based calls. CustomValue is retrieved or deployed together with a GlobalValueSet or CustomObject component.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

CustomValue components have the suffix .customValue. A CustomValue component is returned with either a GlobalValueSet or CustomObject component.

Version 

Introduced in API version 38.0.

CustomValue replaces GlobalPicklistValue from API version 37.0.

Fields 

color 

  • Type: string
  • Required: No
  • Description: The color assigned to the picklist value when it’s used in charts on reports and dashboards. The color is in hexadecimal format; for example, #FF6600. If a color isn’t specified, it’s assigned dynamically upon chart generation.

default 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this value is the default selection for the global picklist and the custom picklists that share its picklist value set. This field is set to true by default.

description 

  • Type: string
  • Required: No
  • Description: A picklist value’s description. It’s useful to include a description for a picklist value so the reason for creating it can be tracked. Limit: 255 characters.

isActive 

  • Type: boolean
  • Required: No
  • Description: Indicates whether this value is active or inactive. The default value is true. Users can select only active values from a picklist. An API retrieve operation for global picklist values returns all active and inactive values in the picklist. But retrieving the values of a non-global, unrestricted picklist returns only the active values.

label 

  • Type: string
  • Required: No
  • Introduced: API version 39.0
  • Description: The value’s display label. If you don’t specify the label when creating a value it defaults to the API name.

StandardValue Type 

This metadata type defines a value in a value set for a standard picklist and specifies whether this value is the default value.

When you deploy changes to standard picklist fields, picklist values are added as needed.

Parent Type 

This type extends CustomValue and inherits its fields.

Fields 

allowEmail 

  • Type: boolean
  • Required: No
  • Introduced: API version 18.0
  • Description: Indicates whether this value lets users email a quote PDF (true), or not (false). This field is only relevant for the Status field in quotes.

closed 

  • Type: boolean
  • Required: No
  • Description: Indicates whether this value is associated with a closed status (true), or not (false). This field is only relevant for the standard Status field in cases and tasks. This field is available in API version 16.0 and up to version 36.0. In version 37.0, this field is in GlobalPicklistValue.

converted 

  • Type: boolean
  • Required: No
  • Introduced: API version 16.0
  • Description: Indicates whether this value is associated with a converted status (true), or not (false). This field is relevant for only the standard Lead Status field in leads. Your organization can set its own guidelines for determining when a lead is qualified, but typically, you want to convert a lead as soon as it becomes a real opportunity that you want to forecast. For more information, see Convert Qualified Leads in Salesforce Help.

cssExposed 

  • Type: boolean

  • Required: No

  • Introduced: API version 16.0

  • Description: Indicates whether this value is available in your Self-Service Portal (true), or not (false). This field is only relevant for the standard Case Reason field in cases.

    Self-Service provides an online support channel for your customers - allowing them to resolve their inquiries without contacting a customer service representative. For more information about Self-Service, see Setting Up Your Self-Service Portal in Salesforce Help.

Starting with Spring ’12, the Self-Service portal isn’t available for new Salesforce orgs. Existing orgs continue to have access to the Self-Service portal.

Note

forecastCategory 

  • Type: ForecastCategories (enumeration of type string)

  • Required: No

  • Introduced: API version 16.0

  • Description: Indicates whether this value is associated with a forecast category (true), or not (false). This field is only relevant for the standard Stage field in opportunities.

    • Omitted
    • Pipeline
    • BestCase
    • Forecast
    • Closed
  • Possible values:

    • Omitted
    • Pipeline
    • BestCase
    • MostLikely
    • Forecast
    • Closed

highPriority 

  • Type: boolean
  • Required: No
  • Introduced: API version 16.0
  • Description: Indicates whether this value is a high priority item (true), or not (false). This field is only relevant for the standard Priority field in tasks. For more information about tasks, see Start Using Tasks in Salesforce Help.

probability 

  • Type: int
  • Required: No
  • Introduced: API version 16.0
  • Description: Indicates whether this value is a probability percentage (true), or not (false). This field is only relevant for the standard Stage field in opportunities.

reverseRole 

  • Type: string

  • Required: No

  • Introduced: API version 18.0

  • Description: A picklist value corresponding to a reverse role name for a partner. If the role is subcontractor, then the reverse role might be general contractor. Assigning a partner role to an account in Salesforce creates a reverse partner relationship so that both accounts list the other as a partner. This field is only relevant for partner roles.

    For more information, see Partner Fields in Salesforce Help.

reviewed 

  • Type: boolean
  • Required: No
  • Introduced: API version 16.0
  • Description: Indicates whether this value is associated with a reviewed status (true), or not (false). This field is only relevant for the standard Status field in solutions. For more information about opportunities, see Creating Solutions in Salesforce Help.

won 

  • Type: boolean
  • Required: No
  • Introduced: API version 16.0
  • Description: Indicates whether this value is associated with a closed or won status (true), or not (false). This field is only relevant for the standard Stage field in opportunities.

Declarative Metadata Sample Definition 

For an example of CustomValue components within a GlobalValueSet component that’s referenced by a package.xml, see GlobalValueSet.