Skip to main content
edited title
Link
Robert Sösemann
  • 38.2k
  • 29
  • 172
  • 508

Why favor Custom Metadata overvs. Custom Objects in Managed Package

Became Hot Network Question
Tweeted twitter.com/StackSalesforce/status/1283144257675591680
Source Link
Robert Sösemann
  • 38.2k
  • 29
  • 172
  • 508

Why favor Custom Metadata over Custom Objects

I worked on Managed packages for nearly 10 years now and never missed Custom Metadata Types. Not before they came and not after they were announced. I didn't come across a single great and technical severe reason to use Custom Metadata Types over regular Custom Object.

Unlike Custom Objects they:

  1. Don't support triggers
  2. Are hard to create in Apex Tests
  3. Have a very limited number of field types
  4. Have an inflexible UI to managed records

The only use case where CMDT are somewhat nice is, that you cannot package Custom Object records in packages. But that is also not an issue. You can perfectly store hundreds of Custom records in JSON serialized form in a single packaged Static Resource and unpackage them on install.

So tell me what your reasons are to favor them over Custom Objects?