function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vivek Kumar 257Vivek Kumar 257 

hi, I have a metadata type from which i want to create a dynamic form by using type and label from custom metadata in lightning component. Anyone please tell me how to get label or types of metadata fields up to js controller in lightning component

Vishal Gupta 107Vishal Gupta 107
Hi Vivek, I'm also looking to achieve similar. Did you get any solution around? 
Vivek Kumar 257Vivek Kumar 257
Yes i found that solution. In metadata we have to create as a record whatever field we required, such as type and label . Means in metadata object first you need to create all those fields as a field which we required ex : type and label. Step 2. Now you need to create record for those fields of metadata and now put type in type feild whatever you want and in label as required. Step 3: Now query for that metadata object records and then you will get desired type and label in form of record. Step 4. Now you can use those field type and label according to your requirement that's it. If you have any other doubt then ask again with what's your requirement and If you found that answer helpful then reply and mark answer as best answer. Thanks.
Vishal Gupta 107Vishal Gupta 107
Thanks for replying. I also did the same. 
Deblina BhattacharyyaDeblina Bhattacharyya
Can you please share the code ?