6

I am trying out a few things with custom metadata types. My sandbox has winter 16 release and my production is summer 15. I moved the custom metadata types from sandbox to production except that it had problems with page layout of custom metadata types. But other than that the deployment went fine.

But the data doesnt seem to have moved to prodn. The query's all work without any issues except that they dont have no records.

The question i have is does the deployment of custom meta data types does not include the data. Is it because production orgs are not on Winter 16?

10

You can deploy custom metadata records in changesets, but you have to add them to the changeset (which is different from just adding the type). In the "Component Type" dropdown, look for the name of your custom metadata type (In Summer 15, the Api Name; in Winter 16 it's the label).

The reason for this: Suppose you had 10K records of a type. Why redeploy them all, if you're just changing a couple?

| improve this answer | |
  • I deployed the changeset with custom metadata. I had problem with pagelayout which i removed and deployed the changeset. But i cant see an option to view the custom metadata(which is ok as long as it has the data which was entered in SB), debug logs show no records in the custom meta data. – Prady Sep 17 '15 at 2:26
  • There's no option to view the custom metadata because Summer 15 didn't have any native UI for it. (This is also why you couldn't deploy the layout--custom metadata types are only layoutable, because they only have a native UI, as of Winter 16). Do you see the records (not just the type) listed on the inbound change set's page? – Avrom Roy-Faderman Sep 17 '15 at 2:30
  • No, i dont see the data. All i see is the custom metadata type, its fields. Should i also add data while using outbound changeset? Not sure i could see on the component dropdown. I understand the issue of pagelayout not moving over – Prady Sep 17 '15 at 2:47
  • Yes, sorry, that's what I meant by "adding the records." You need to add the "data" (I use scare quotes since after all the point is that the records are metadata) to the change set explicitly. When you're selecting components to add to your changeset, look in the dropdown list for your particular custom metadata type (not "Custom Metadata Type", which is for the types). – Avrom Roy-Faderman Sep 17 '15 at 2:55
  • You just made my day :) I knew i was missing something Thankyou !!! – Prady Sep 17 '15 at 3:00
0

In this case you have several components to be added to the change set,

  1. The custom metadata type object itself (__mdt)
  2. Fields of the custom meta data type you created
  3. Layout of the custom meta data type
  4. Lastly the custom metadata records (you can see the customMetadataType object's name listed in the "Component Type" dropdown )

Cheers!

| improve this answer | |

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.