0

I have used this sfdx cmd to execute the mass record insertion in custom metadata.

sfdx force:cmdt:record:insert --filepath CountryMapping.csv --typename CountryDialingCodeMapping__mdt

I am getting error :

The column Country_Code__c is not found on the custom metadata type CountryDialingCodeMapping.

enter image description here

Sample CSV.file

Name,Country_Code__c ,Dialing_Code__c  
Saint Helena,SH ,290
Saint Kitts and Nevis,KN ,"1,869"
Saint Lucia,LC ,"1,758"
Saint Martin,MF ,590

2 Answers 2

1

Do not include random spaces before a comma in the CSV file. CSV parsers may see those spaces as part of the value. In other words, the command thinks you're trying to access a field called Country_Code__c , not Country_Code__c (note the extra space). See RFC 4180 for more information.

0
0

Sorry for a shameless plug, but XL-Connector will let you pull/edit/update/create your custom metadata directly from an Excel spreadsheet.

You must log in to answer this question.

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