I need to migrate Custom Metadata type using a package.xml.

Can someone please let me know what should I put to get the metadata along with data successfully get migrated? Suppose Custom Metadata type name is Call_Duration_Zip_abv__mdt.

  • Why not use Change set for this.This is one of the best feature of suing Custom metadata type – Samir Apr 27 '17 at 6:04
  • No our client deliberately needs package . xml :( – Testing_SFDC Apr 27 '17 at 6:11

From the Document

A custom metadata type is defined as a custom object and is stored in the objects folder. Custom metadata types have a suffix of __mdt (instead of __c for custom objects). Custom metadata type field names have a suffix of __c, like other custom fields. Custom metadata type field names must be dot-qualified with the name of the custom metadata type to which they belong.

This excerpt from a package.xml file shows the use of dot notation and the __mdt suffix. If you’re using a namespace, for example picklist1234,​ the full name of ReusablePicklistOption__mdt would be picklist1234__ReusablePicklistOption__mdt.

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

Go through this if you need more information. Let us know if this works for you or not.

| improve this answer | |
  • 1
    Gotta love the Metadata API docs. That's always my first step when I need to figure out how to deploy something new via ANT. – Derek F Apr 27 '17 at 12:52

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.