Log Entry

Record-Type Picklists in Apex

Feb 23, 2026 · 3 min read

This has been one of those "why is this still hard" Apex problems for a long time.

Getting picklist values by record type usually pushed us toward UI API callouts, often via:

/ui-api/object-info/{objectApiName}/picklist-values/{recordTypeId}/{fieldApiName}

Yes, it worked. But it also felt clunky, and it burned callouts for something that should have been simple server-side metadata access.

What changed

Now we can get all picklist values for a record type directly in Apex:

ConnectApi.PicklistValuesCollection picklists =
    ConnectApi.RecordUi.getPicklistValuesByRecordType(objectApiName, recordTypeId);

Method details:

  • Class: ConnectApi.RecordUi
  • Method: getPicklistValuesByRecordType(String objectApiName, String recordTypeId)
  • Return type: ConnectApi.PicklistValuesCollection
  • API version: 66.0
  • Available to guest users: 66.0
  • Requires Chatter: No

Why this is a big quality-of-life improvement

No fake UI API callout dance.

You request once and get the picklist values for that record type in a single collection.

This is especially nice for dependent picklists. If you have something like:

  • Continents__c
  • Countries__c
  • Cities__c

you can fetch everything once and apply dependency logic from one ConnectApi.PicklistValuesCollection, instead of stitching together multiple endpoint calls.

Where it is available

Available in Lightning Experience and Salesforce Classic for Enterprise, Performance, Unlimited, and Developer editions.

Practical takeaway

If you still have Apex that calls UI API just to resolve record-type picklists, API 66.0+ gives you a cleaner default now with ConnectApi.RecordUi.getPicklistValuesByRecordType(...).