---
schema_version: "1"
id: d8f805ac20316ae03dfd1d6ff73dbff45e0195eb321b9e66f1e9a5390555db75
title: RecordUi Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_RecordUi_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_RecordUi_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 278916bb71e57e69531e3a8c54a771159edeccacd43e83c1a06c8346b13cd2bc
description: Get picklist values by record type.These methods are for RecordUi. All methods are static.Get the values for all the picklist fields of a specific record type.
---
# RecordUi Class

Get picklist values by record type.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## Usage

Apex methods in the RecordUi class can’t be used in packages that use push upgrades.

## RecordUi Methods

These methods are for RecordUi. All methods are static.

- **[getPicklistValuesByRecordType(objectApiName, recordTypeId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_RecordUi_static_methods.htm#apex_ConnectAPI_RecordUi_getPicklistValuesByRecordType_1)**  
    Get the values for all the picklist fields of a specific record type.

### getPicklistValuesByRecordType(objectApiName, recordTypeId)

Get the values for all the picklist fields of a specific record type.

#### API Version

66.0

#### Available to Guest Users

66.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.PicklistValuesCollection getPicklistValuesByRecordType(String objectApiName, String recordTypeId)

#### Parameters

objectApiName

Type: String

API name of a [User Interface API supported object](https://developer.salesforce.com/docs/atlas.en-us.264.0.uiapi.meta/uiapi/ui_api_get_started_supported_objects.htm#ui_api_get_started_supported_objects).

recordTypeId

Type: String

ID of a record type.

#### Return Value

Type: [ConnectApi.PicklistValuesCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_picklist_values_collection.htm "Collection of picklist values for all the picklists of a record type.")

#### Usage

This method is especially useful for getting dependent picklist values. For example, if an object has a tree of dependent picklists (Continents\_\_c, Countries\_\_c, Cities\_\_c), use this method to get all the values for each picklist in one request.

![Important](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note_important.png)

#### Important

This Apex method can’t be used in packages that use push upgrades.