# DTO_PickList

**Class** · Group: `Data Transfer Objects`

Learn it: [DTOs guide](/dtos-guide)

<div class="apex-member apex-class">

```apex
global inherited sharing class DTO_PickList
```

A Data Transfer Object (DTO) representing a single picklist and all associated values. This class is typically used to retrieve and manage picklist values dynamically, often for use in invocable actions.

**Example**

```apex
DTO_PickList picklist = new DTO_PickList();
picklist.picklistName = 'Status__c';
picklist.values = new List<DTO_PicklistValue>();
```

**See Also:** [FLOW_GetPicklistValues](/reference/apex/flow-getpicklistvalues)

</div>

---

## Fields

| Field | Description |
|-------|-------------|
| global [DTO_PicklistValue](/reference/apex/dto-picklistvalue) [defaultValue](#defaultvalue) | The default value for the picklist, represented as a DTO_PicklistValue object. |
| global [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm) [picklistName](#picklistname) | The API name of the picklist field. |
| global [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm)<[DTO_PicklistValue](/reference/apex/dto-picklistvalue)> [values](#values) | A list of all available values for this picklist. |

### defaultValue

```apex
@AuraEnabled @InvocableVariable(required=false description='The default value for the picklist, or null if there isn't one' label='Default Value') global DTO_PicklistValue defaultValue
```

**Type:** [DTO_PicklistValue](/reference/apex/dto-picklistvalue)

The default value for the picklist, represented as a DTO_PicklistValue object.
If there is no default value, this field will be null.

**Example**

```apex
DTO_PicklistValue value = instance.defaultValue;
```

### picklistName

```apex
@AuraEnabled @InvocableVariable(required=true description='The API Name for the picklist' label='Api Name') global String picklistName
```

**Type:** [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm)

The API name of the picklist field. This name is used for programmatic references
and is case-sensitive.

**Example**

```apex
String value = instance.picklistName;
```

### values

```apex
@AuraEnabled @InvocableVariable(required=true description='A list of values for PickList field' label='Values') global List<DTO_PicklistValue> values
```

**Type:** [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm)

A list of all available values for this picklist. Each entry is represented as a
DTO_PicklistValue object, which includes both the label and API name of the value.
This list corresponds to the field's available options and respects any record-type-specific
or object-specific restrictions.

**Example**

```apex
List<DTO_PicklistValue> value = instance.values;
```
