Salesforce Metadata: Developer Guide

What is Salesforce Metadata?

Metadata is a simple lightweight language which based on XML (Extensible Markup Language).
Metadata in Salesforce describes the structure of and development artifacts.

Instead of the traditional development approach of code-compile-package-deploy, with you only need to code.

Kurl-on awards its creative mandate to FCB Ulka, Marketing & Advertising News, ET BrandEquity

The magic here is that the metadata is zipped and transferred to the servers (much faster than uploading compiled code) where it is unzipped and compiled on your behalf. Not only is this super fast, but your changes are immediately available through any web browser, and there’s no downtime at all.

There are several types of Metadata, with each one representing a unique way a business function can be customized.

What is a custom metadata type?

A custom metadata type is an object that is used to define the structure for application metadata. The fields of custom metadata types, and the values in the fields, consist only of metadata.

The records of custom metadata types are also metadata, not data. Using metadata is pretty handy because it can be imported into Salesforce, modified in the interface, and manipulated using the Metadata API. 

When you deploy apps with custom metadata types, all of the records and fields are included in the package installation, so no additional steps are needed. You can deploy custom metadata types from a sandbox with change sets or packaged in managed packages.

Use Cases for Custom Metadata Types

Here are some examples of what you can do with custom metadata types.

  • Mappings- You can use custom metadata types to create associations between different objects. For example, you can create a custom metadata type that assigns cities, states, or provinces to particular regions in a country.
  • Business rules- Salesforce has lots of ways to define business rules. One way is to combine configuration records with custom functionality. For example, you can use custom metadata types along with some Apex code to route payments to the correct endpoint.
  • Master data- Say that your org uses a standard accounting app. You can create a custom metadata type that defines custom charges, like duties and VAT rates. If you include this type as part of an extension package, subscriber orgs can reference this master data.
  • Protected information-Store data like API keys in a protected package.

More About Custom Metadata Types

Custom metadata types support most standard field types, including:

  • Metadata Relationships
  • Checkbox
  • Date and Date/Time
  • Email and Phone
  • Number
  • Percent
  • Picklist
  • Text and Text Area
  • URL

For the full list of Metadata types, click here.


Developer Support

Developers can use SOQL to read custom metadata types. To create or update metadata records, they can use the Metadata API. Apex code can create, read, and update (but not delete) custom metadata records.

Reference Custom Metadata Types

Custom metadata types can be used directly from:

  • Apex
  • Flows
  • Formula fields
  • Process Builder
  • Validation rules

Custom metadata types are customizable, deployable, packageable, and upgradeable application metadata. In many cases, custom metadata types have an advantage over custom settings and custom objects. They can make your application lifecycle management and compliance easier, faster, and more robust. In the next unit, you create your own custom metadata type.



  • For more information on Salesforce Metadata: Developer Guide, click on this link to clarify your doubts.  


What is a Chatbot and why is it important?

“Consumers and businesses are increasingly using chatbot technology. Here’s how chatbots are changing customer service, powered by artificial intelligence.”       What is a Chatbot? 🤖 ➥ Computer programs

 186 total views

Read More »

6 Ways to Use Workbench in Salesforce

Salesforce Workbench is a Free, Online device that can be utilized for Data Management activities such as Bulk Record Updates, Mass Creation, and Mass Deletion. If you’ve ever used Data

 207 total views

Read More »

Salesforce Licenses Types

What is Salesforce License Types? A License definition is a metadata description of the Salesforce features and services available to your organization. License definitions describe functionality for your org as a whole

 285 total views

Read More »