RecordUi Class
Get picklist values by record type.
Namespace
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)
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.
- recordTypeId
- Type: String
- ID of a record type.
Return Value
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.