Explain custom metadata types versus custom settings versus custom objects for configuration data.
Suggested answer
All three can hold configuration, but they differ on deployability, caching, and storage:
1. Custom metadata types: The default choice. Records are metadata, so they deploy with change sets and packages, are cached and accessible in Apex without SOQL limits, and consume no data storage. Use for anything that should move with a release: rules, thresholds, mappings, feature toggles.
2. Hierarchy custom settings: Retain one capability metadata types lack — per-profile and per-user value resolution at runtime. Use when the requirement is genuinely a per-user or per-profile override.
3. List custom settings: Largely superseded by custom metadata types. I would not choose them for new work.
4. Custom objects: For configuration that business users maintain themselves as ordinary data, that needs record-level sharing, or that is too large or too volatile to deploy by release — a reference dataset synchronised from an external master, for example.
5. The deciding question: Does this value change by deployment or by business operation? Deployment means metadata; operation means data.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.