Loading
Enhance Salesforce with Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Package Custom Metadata Types and Records

          Package Custom Metadata Types and Records

          You can package custom metadata types and records in unmanaged packages, managed packages, or managed package extensions. Your packages can then be installed in Professional, Developer, Enterprise, Performance, Unlimited, and Database.com Edition organizations.

          Required Editions

          Available in: Salesforce Classic and Lightning Experience

          Protected custom metadata types in managed packages are available in: Developer Edition and scratch orgs

          Package uploads and installs are available in Group, Enterprise, Performance, Unlimited, and Developer Editions

          Create, edit, and delete custom metadata type records from installed packages Group and Professional Editions

          You can add custom metadata types and records to packages using the Lightning Platform user interface. From Setup, enter Packages in the Quick Find box, then select Packages, click your package name, and then click Add.

          Note
          Note You can’t uninstall a package with a custom metadata type if you’ve created your own records of that custom metadata type.

          As with all packageable metadata components, you can also add custom metadata types and records to a package by specifying the package’s full name in package.xml. For example, we specify the package in this fragment from Relaxation Gauntlet’s package.xml file.

          <?xml version="1.0" encoding="UTF-8"?>
          <Package xmlns="http://soap.sforce.com/2006/04/metadata">
             <fullName>Relaxation Gauntlet</fullName>
          ...

          Add Custom Metadata Types

          1. Select the Custom Metadata Type component type.
          2. Select the custom metadata type you want to add to your package.
          3. Click Add to Package.

          Add Custom Metadata Records

          1. Select the custom metadata type’s label ​from the available component types—for example, Threat Tier, or if the type is from a package that you’re extending, Threat Tier [vacations].
          2. Select the records to add.
          3. Click Add to Package.

          If you add a record to your package, its corresponding type is automatically added.

          For information on packaging and installing, see the Components Available in Managed Packages.

           
          Loading
          Salesforce Help | Article