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
Rita Leverett 2Rita Leverett 2 

The column Label is not found on the custom metadata type

Hello. I am attempting to upload mdt records using SFDX CLI. I get the error The column Label is not found on the custom metadata type. I saved the file as CSV (Comma delimited) and CSV UTF-8 (Comma delimited) and received the same error. Similar error using MasterLabel. Any help would be appreciated. Thank you.
VinayVinay (Salesforce Developers) 
Hi Rita,

Have you tried below commands?

https://help.salesforce.com/s/articleView?id=release-notes.rn_forcecom_dev_cmt_cli.htm&release=226&type=5

Thanks,
Rita Leverett 2Rita Leverett 2
Yes, Vinay. I did try these commands. The error happens when deploying to the org. The CMDT does have Label in the definition. I also tried MasterLabel and received the same error.
Abhi MehtaAbhi Mehta
Hi Rita,
Did you find any solution? I myself facing the same issue and tried everything possible.
Thanks in advance
Abhi MehtaAbhi Mehta
Hi Rita,
I found something that worked for me.
https://salesforce.stackexchange.com/questions/328317/unable-to-insert-custom-metadata-records-with-cmdt-command, 2nd comment with .txt file worked for me.
User-added image
This is my sample .TXT file which got inserted. Hope this helps you.

Thanks!
Rita Leverett 2Rita Leverett 2
I decided to use the Custom Metadata Loader from the AppExchange.
Stephen StoelingaStephen Stoelinga
It seems like you are encountering an issue while trying to upload records for a custom metadata type using the Salesforce CLI (SFDX). The error "The column Label is not found on the custom metadata type" suggests that there might be an issue with the format or structure of your CSV file.

When working with custom metadata types and their records, there are a few things to consider:
MyLabCorp.com (https://www.mylabcorp.us/)
1. CSV File Format:
   - Ensure that the CSV file is in the correct format for custom metadata types. The first row of the CSV file should contain the field names (API names) of the custom metadata type. Make sure that the field names are spelled correctly and match the API names of the custom metadata type's fields in Salesforce.

2. Field API Names:
   - Verify that you are using the correct API names for the fields in your CSV file. Custom metadata type field API names are usually in the format `__mdt.FieldName__`. For example, if you have a custom metadata type called "My_Custom_Metadata__mdt" with a field named "Label," the API name for that field would be `__mdt.Label__`.

3. MasterLabel Field:
   - For custom metadata types, the `MasterLabel` field is used as the default label for records. Make sure that you are including the `MasterLabel` field in your CSV file and that the values are unique for each record.

4. Encoding:
   - Since you mentioned trying both CSV (Comma delimited) and CSV UTF-8 (Comma delimited), encoding should not be an issue. However, it's always a good idea to ensure that your CSV file is correctly encoded as UTF-8.

5. Field Values:
   - Check that the values in your CSV file are correctly formatted and don't contain any special characters or symbols that could cause parsing issues.

To help troubleshoot the specific issue, I would recommend the following steps:

1. Double-check the CSV file's field names, API names, and values to ensure they are accurate.
2. Confirm that the `MasterLabel` field is included and has unique values for each record.
3. Try uploading a small sample of records first to see if the issue persists.
4. Consider using a CSV parsing tool or an external CSV editor to validate the CSV file's format.

If the problem persists, please provide a sample of your CSV file (you can obfuscate any sensitive data) and any additional error messages you receive. This will allow for more specific troubleshooting and assistance.
Ocean MillerOcean Miller
The error message indicates a problem with the "Label" field, possibly due to an incorrect API name or formatting in the CSV file. To troubleshoot, ensure that you are using the correct API name for the "Label" field, typically "DeveloperName," in the CSV file's header row. Also, verify that your CSV file follows the proper format with each row representing a separate record and values separated by commas. Confirm that the file is saved with the correct encoding (UTF-8) and the appropriate file extension (.csv). If you need more assistance this https://pinterestvideodownloader.io/ platform is very updated and informative must explore it. 
mason classmason class

In Apex programming, callouts refer to the process of making a request to an external web service from within a Salesforce application. Callouts enable Apex code to interact with external systems, such as REST or SOAP APIs, to exchange data and perform actions.

When making a callout, the Apex code sends an HTTP request to the external system, which then processes the request and sends back a response. The response can be used to update records in Salesforce or perform other actions within the application.

It's important to note that callouts can only be made to secure external systems that support HTTPS. Additionally, Apex code that makes callouts must be marked as "without sharing" to ensure that the code can access external resources without being restricted by Salesforce's security model. MyeClass (https://www.myeclass.one/)
Nelly MorozovaNelly Morozova
I had both Name and MasterLabel columns in my csv file (since the labels had some spaces) that was saved as CSV UTF-8 (Comma delimited (*.csv). I was getting error: "The column Name is not found on the custom metadata type ...". I've saved the file as CSV (Comma delimited (*.csv), got the error " The column MasterLabel is not found on the custom metadata type..". I've removed the MasterLabel column and got the message "Created custom metadata type records from..." - Metadata records were successfuly created.
The conclusion:
1. File should be saved as CSV (Comma delimited (*.csv) - the format is the same that worked for Custom metadata loader app.
2. Having both columns Name and MasterLabel with different values didn't work, Having only Name worked for me.