Can Custom Metadata be mass inserted?
My Custom Metadata Type is listed as a custom object in the Data Import Wizard but when I –
- select the object
- add new records
- choose the CSV file
none of the fields are mapped and when I click Map an error's displayed
Something has gone wrong. Cannot read property 'length' of undefined.
Please try again.
The Metadata Type is listed in Workbench for SOQL queries but not when I try to use it's insert function. It's not listed in the list of Dataloader objects.
The Data Loader, as far as I can tell, does not support Custom Metadata (and we've been given no indication if this will be available in the future). In fact, custom metadata isn't "real" data, and is actually documented in the Metadata API documentation. You could choose to use Ant and build the appropriate files that way, or you can follow the other instructions for simply loading this metadata.
Summer '20 Update
The Salesforce DX CLI can now import these records using the cmdt command. This is the recommended approach. The older tools are still technically viable, but should only be used if you somehow can't use Salesforce DX.
In the implementation manual, the guide tells you how to import custom metadata:
Edit: The older version, included below in the original quote, has been deprecated. Please use this version instead. It also now includes a Deploy to Salesforce button to make it easier to deploy in fewer steps.