I am trying to get the metadata information without passing the record Id. All I want to do is, pass Developer name value and get the specific metadata record details in LWC. Here's an example from Google

where they are using Record Id to fetch the metadata details. See code below -

import { LightningElement, wire } from 'lwc';
import { getRecord } from 'lightning/uiRecordApi';
const FIELDS = [

export default class LifeCycle extends LightningElement {
    //Id is hardcoded for demo purpose. You can pass a dynamic id here

    @wire(getRecord, { recordId: '$recordId', fields: FIELDS })
    get label() {
        return this.metadatarecord.data.fields.MasterLabel.value;

    get developername() {
        return this.metadatarecord.data.fields.DeveloperName.value;

    get active() {
        return this.metadatarecord.data.fields.isActive__c.value;

    get language() {
        return this.metadatarecord.data.fields.Language.value;
  • 2
    As of today, it is not possible without Apex. Check this SFSE Question for more details.
    – Saroj Bera
    Apr 10, 2023 at 11:35
  • I understand the fact that there is no way we can use something other than record id as parameter in order to fetch the metadata. Thanks. Apr 10, 2023 at 15:49

1 Answer 1


you want to access platform metadata from clientside(LWC) .. thats a big security no from Salesforce... although it can be done use authentication, and metadata api calls directly from js using fetch but this will be flagged on all security reviews

  • Thank you for sharing the info. Apr 10, 2023 at 15:49

You must log in to answer this question.

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