Custom Metadata - proving read & write behavior in managed packages

This repo documents experiments ran in August 2023 that proved:

  1. Upgradable (Developer controlled) fields in a managed package are not updatable in a subscriber org via Apex Metadata API on any permutation of:
    • Protected or Unprotected records, on
    • Custom Metadata Types of Global, Namespace, or Managed Package scopes,
    • In 1GP or 2GP
  2. Conversely, Subscriber controlled fields in a managed package are updatable in a subscriber org via Apex Metadata API on all of the above permutations (using Apex code in the same package).

So the field level setting is all that matters to determine whether apex within the same managed package as the Custom Metadata types, records, and fields, will be able to update Custom Metadata record fields via Apex Metadata API.

Here is an accompanying visual that is mostly still correct. The above findings are the source of truth over this diagram when they differ. image This image comes from this video from Dreamforce 2018 by the Salesforce.org team.

Salesforce DX Project: Next Steps

Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.

How Do You Plan to Deploy Your Changes?

Do you want to deploy a set of changes, or create a self-contained application? Choose a development model.

Configure Your Salesforce DX Project

The sfdx-project.json file contains useful configuration information for your project. See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file.

Read All About It