0

I'm writing today because I need to clarify something about the Custom Metadata Types. Here's my doubt:

let's say we have a Custom Metadata Type named X__mdt, with a Subscriber Editable field Y__c of type Text, we have a record named Z and that Z.Y__c is equals to "Yes". Record Z was deployed to Production Org using the Ant Migration Tool by our Developers.

Now due to a business needs an Administrator, in Production Org, updates record Z setting Y__c to "No". What happen if a Developer makes a deploy, always using the Ant Migration Tool, and the package contains the record Z but with the field Y__c set to "Yes"?

According to the doc: "Subscriber editable—Anyone with the correct permissions can change the value of the field at any time. Changes deployed by the developer don’t overwrite values in the subscriber’s organization."

What I were expecting was that after the deploy record Z would not be overwritten by the deploy, so field Y__c would still be set to "No". I made a test, and that's not true. Record Z gets overwritten and the value of Y was back to "Yes".

What m'I missing here ?!

1 Answer 1

2

Y__c will be overriden with the value in the metadata. This is expected behaviour.

The meaning of 'Subscriber editable' is that the value can be controlled within the subscriber org, as opposed to only be controlled via the package. That means it can be updated via the UI, or an ant deployment.

You then need to decide whether to include your custom metadata in your ant deployments. On the one hand, it's great to have your code controlled and versioned, on the other hand, you run the risk of overriding important configuration in your production org.

2
  • Hi Nick, thanks for your help. What you said make sense... but if it's true then the docs is not clear at all. I have opened a Case to SFDC to clarify this, I'll post here any update about
    – Marco
    Oct 18, 2016 at 9:09
  • Note that the docs do specifically say "when records of this type are included in a managed package" before listing the options. This list only affects the behavior of metadata records in managed packages (and "classic managed packages"). Jun 4, 2021 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .