1

I've been testing to insert a custom metadata type record from a CSV file via Salesforce CLI. I've used below command but I've been getting the following error:

Command

sfdx force:data:bulk:upsert -i Id -f cmdt.csv -s Mapping__mdt -u newuser@salesforce.org

Error

No create/update access for object: Mapping__mdt

Please take note that I use the System Administrator profile, so I am expecting that I have the right access.

It is my first time loading custom metadata type records via CLI, hoping to incorporate Salesforce DX technology in my present and future implementations. Would like to ask for your help regarding this.

3

We are happy to announce that the CLI plugin for custom metadata types is available in CLI v49. You now will be able to bulk insert records from a CSV file or use an existing custom object / setting to generate custom metadata types from it.

Plugin - force:cmdt Command - force:cmdt:record:insert. Creates custom metadata type records from a comma-separated values (CSV) file.

More details on the usage of various commands, with descriptions, flags and examples, is available in the CLI reference manual and help documentation.

Custom Metadata Types Documentation: https://help.salesforce.com/articleView?id=custommetadatatypes_cli.htm&type=5

Salesforce CLI Command Reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_cmdt.htm#cli_reference_force_cmdt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.