I'd like to access the picklist values of a field on a Custom Metadata Type from an LWC:

import { getPicklistValues } from "lightning/uiObjectInfoApi";
import { getObjectInfo } from "lightning/uiObjectInfoApi";
import SYNC_MODE_FIELD from "@salesforce/schema/Setting__mdt.Sync_Mode__c";
import SETTING_MDT_OBJECT from "@salesforce/schema/Setting__mdt";

Then I am using getObjectInfo

@wire(getObjectInfo, { objectApiName: SETTING_MDT_OBJECT }) 

And then I am using getPicklistValues

@wire(getPicklistValues, { 
                            recordTypeId: "$settingObjectInfo.data.defaultRecordTypeId", 
                            fieldApiName: SYNC_MODE_FIELD 

But both settingObjectInfo and syncModes are null

Am I correct in assuming that getObjectInfo and getPicklistValues don't support Custom Metadata Type?

2 Answers 2


It looks like the documentation here could use some clarification.

  1. This reference appears to leave open the possibility that Custom Metadata types may be supported by lightning/ui*Api modules (however, MDT's are not really "custom objects," strictly speaking):


The wire adapters and JavaScript functions in lightning/ui*Api modules are built on User Interface API. User Interface API supports all custom objects and many standard objects.

  1. When it comes to the Lightning Data Service overall, the documentation is clear - Custom Metadata Types are not supported:


IMPORTANT Lightning Data Service supports all custom objects and all the standard objects that User Interface API supports. External objects, person accounts, and custom metadata types are not supported.


First off you can import both in one line as per below. :)

import { getObjectInfo, getPicklistValues } from 'lightning/uiObjectInfoApi';

Also, as per below link it does not explicitly say it supports Custom Meta Data. User Interface API supports all custom objects and many standard objects.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .