3

I was looking to Migrate the Custom Metadata settings from Dev to SIT box. For that I created the following package.xml. I have total 5 different custom metada setting

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomMetadata</name>
    </types>
    <version>40.0</version>
</Package>

Using retrieveUnpackaged command, able to fetch all the Custom Metadata settings and trying to deploy all these components to SIT using deployUnpackaged command. Note: Commands used as per build.xml file.

But unable to deploy those packages, because I feel through ANT deployment there is no way to create Custom Metadata schema first then deploy all the records. Any guidance on how to create Custom medata schema using ANT or how to migrate newly Custom Metadata settings to target org ?

  • Jitendra Zaa has an introduction to Custom Metadata in package.xml. I was mistaken about this myself - the IDEs handle it a little differently. – David Reed Jan 12 '18 at 20:50
2

Ok I got the solution from the link : http://www.jitendrazaa.com/blog/tag/ant-migration-tool/ . Custom Metadata is also an Object. You just need to fetch the details like any other Custom object then above package.xml will load all records into the Custom Metadata.

This is working very fine for me.

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>ABC__mdt</members>
        <name>CustomObject</name>
    </types>
    <version>40.0</version>
</Package>

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.