+ Start a Discussion
Bohdan DovhanBohdan Dovhan 

How to retrieve or deploy Custom Metadata Records by ANT Migration Tool?

How to retrieve or deploy Custom Metadata Records by ANT Migration Tool?

Is this possible?

I guess it should be possible if this is available for packages and changesets but can't find a way out to do this.

How to do this?

Found some article about this here:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_custommetadata.htm#meta_custommetadata<types> <members>*</​members> <name>Custom​Metadata</name> </types>I see errorpackage.xml - Entity type: 'Custom​Metadata' is unknownDoes anyone knows how to overcome this error?

This should be working since version 31 but it is not working even in version 35.0
Best Answer chosen by Bohdan Dovhan
Bohdan DovhanBohdan Dovhan
Gosh!
This works:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_custommetadata.htm#meta_custommetadata

    <types>
        <members>*</​members>
        <name>CustomMetadata</name>
    </types>


I just had some invisible character ( &&#8203;#8203; Unicode Character 'ZERO WIDTH SPACE' (U+200B) http://www.fileformat.info/info/unicode/char/200b/index.htm )  copied from documentation between small 'm' and capitalised 'M':

    <types>
        <members>*</​members>
        <name>Custom​Metadata</name>
    </types>

All Answers

AshlekhAshlekh
Hi,

There are many blog on this. Some are here which tell you know how to deply and retrive the meta data.

http://www.infallibletechie.com/2014/06/ant-setup-for-salesforce-migration.html
http://www.salesforcetutorial.com/migration-tool/
http://www.soliantconsulting.com/blog/2013/07/salesforcecom-ant-migration-tool

-Thanks
Ashlekh Gera
Bohdan DovhanBohdan Dovhan
Gosh!
This works:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_custommetadata.htm#meta_custommetadata

    <types>
        <members>*</​members>
        <name>CustomMetadata</name>
    </types>


I just had some invisible character ( &&#8203;#8203; Unicode Character 'ZERO WIDTH SPACE' (U+200B) http://www.fileformat.info/info/unicode/char/200b/index.htm )  copied from documentation between small 'm' and capitalised 'M':

    <types>
        <members>*</​members>
        <name>Custom​Metadata</name>
    </types>
This was selected as the best answer
Michael PaisnerMichael Paisner
You can also specify specific CustomMetadata records to deploy:
    <types>
        <members>MetadataObjectName.Record1Name</members>
        <members>MetadataObjectName.Record2Name</members>
        <name>CustomMetadata</name>
    </types>

This works in Version 31.0 and higher.

Mike
Shaila Shinde (Admin)Shaila Shinde (Admin)
Thanksk Michael, it worked if you want to retrieve the specific records from CustomMetadata. Below is my package.xml
    <types>
        <members>MetadataObjectName.DeveloperNameOfTheRecord1</members>
       <members>MetadataObjectName.DeveloperNameOfTheRecord2</members>
        <name>CustomMetadata</name>
    </types>
    <types>
        <members>MetadataObjectName__mdt</members>
        <name>CustomObject</name>
    </types>
Tara RootTara Root
Great post, i like it! Ordering your essay from writers our platform https://expertpaperwriter.com/slader-review/ and be free from worries about your secret being revealed. We provide the best protection for clients we write for, and so our service ensures that their data is not accessible to any parties.