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 })
settingObjectInfo
And then I am using getPicklistValues
@wire(getPicklistValues, {
recordTypeId: "$settingObjectInfo.data.defaultRecordTypeId",
fieldApiName: SYNC_MODE_FIELD
})
syncModes;
But both settingObjectInfo
and syncModes
are null
Am I correct in assuming that getObjectInfo
and getPicklistValues
don't support Custom Metadata Type
?