Deploying reference data: custom metadata and upserts
When configuration belongs in custom metadata records that deploy with the release, how to move and generate those records, their allocation, locks and package protection, and how to load reference data kept in custom objects with external IDs, tree imports and bulk upserts.
Given a scenario, describe and recommend an approach to manage and deploy technical reference data - configuration stored as object data.
~8 min read · 14 practice questions ·
What the exam expects
- Recommend custom metadata records, a custom setting or a custom object for technical reference data, from volume, hierarchy needs and how the data must deploy.
- Move custom metadata records with change sets and manifests, and generate them with the
sf cmdtcommands. - Predict deploy-time behaviour: omitted values,
xsi:nil, record locks and the character allocation. - Load object-based reference data repeatably with external IDs, relationship columns, tree imports and bulk upserts.
- Explain protected versus public custom metadata in managed packages.
Key terms: technical reference data (configuration stored as records, such as mappings or rates), custom metadata record (a record whose values are metadata, so it deploys), external ID (an indexed custom field that identifies a record across orgs), upsert (insert if missing, update if present), plan file (a CLI file that orders sObject tree files for import), protected type (a packaged type subscribers can't add records to).
Key facts
- Detail
- Can't be deployed by package, Metadata API or change set
- Detail
- Its records aren't included automatically
- Detail
- Type name without
__mdt, a dot, record name
fromorg and hierarchy settings- Detail
- Not supported
- Detail
- 10 million characters per org, by maximum field size
- Detail
- 50,000
- Detail
- Child to parent only; no grandparent
- Detail
- Maximum 2,000 records
- Detail
- 200 records with
--files; more with--plan
Sources for this section (8)
- Understanding Custom Metadata Typestrailhead.salesforce.com (opens in a new tab)
- Custom Metadata Types in Change Setshelp.salesforce.com (opens in a new tab)
- CustomMetadatadeveloper.salesforce.com (opens in a new tab)
- Create and Manage Custom Metadata Types Using CLI Commandshelp.salesforce.com (opens in a new tab)
- Custom Metadata Allocations and Usage Calculationshelp.salesforce.com (opens in a new tab)
- Relationship Fields in a Header Rowdeveloper.salesforce.com (opens in a new tab)
- data export treedeveloper.salesforce.com (opens in a new tab)
- data import treedeveloper.salesforce.com (opens in a new tab)
- Why does a Text Area field on a custom metadata type use the allocation faster than a 10-character Text field?
- When must files in a tree import plan be ordered?
- Which parent fields can a relationship column in a bulk CSV header use?
- Why should a package developer pick protected record developer names carefully?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform Development Lifecycle and Deployment Architect pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 26 lessons of the Platform Development Lifecycle and Deployment Architect guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (14 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams