You need to sign in to do that
Don't have an account?
Rita 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.
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,
Did you find any solution? I myself facing the same issue and tried everything possible.
Thanks in advance
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.
This is my sample .TXT file which got inserted. Hope this helps you.
Thanks!
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.
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/)
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.