CUSTOM SETTINGS VS CUSTOM METADATA


Choosing the right solution for salesforce management, whether it be release management, data backup and recovery, or security, requires a deep understanding of the two key components of Salesforce configuration: custom settings and custom metadata. Although designed for similar purposes, they each have their own use cases and are frequently used together to achieve the best results.

Custom Settings

Salesforce custom settings offer enterprises an easy way to store and access information without having to write and maintain code. Custom settings are organized little value pairs where the custom object’s record names are used as a key to look up corresponding values. A great advantage of custom settings is that they can be accessed quickly and easily without complex API integrations, which makes them perfect for frequently-accessed data content. Additionally, they can also be defined as “hierarchy”, meaning that they can be set up specifically for each user type to reflect different business logic depending on the individual user’s context.

Custom Metadata

Custom metadata, on the other hand, is stored outside of the Salesforce data storage and can be a useful way to store configuration data. Custom metadata is not accessible via the Salesforce API and is only available via the Metadata API. This proves useful when you need to store read-only values or when configuration items must not be changed by normal users. Furthermore, custom metadata records can also be packaged and deployed between different Salesforce organizations via the Salesforce CLI. This allows for greater control over any widely distributed configuration data, as the custom metadata records are stored in protected source control repositories.

Which to Choose?

While both offer great advantages suited for different use cases, it is important to understand when to take advantage of either custom settings or custom metadata. Generally, when dealing with system data that changes frequently, custom settings are a great solution. However, when confronted with data that is only to be changed on an infrequent basis or in deployments, custom metadata is the best fit.

In conclusion, custom settings and custom metadata are two great Salesforce components that, when used together, allow enterprises to set up the right configuration for any given situation. With a clear understanding of their use cases and how they can be combined, businesses are enabled to make the most appropriate choice for their salesforce data management needs.

Topics:

SFDC best practices

,

Salesforce tools

signup for our blog

Flosum

“Flosum is the best native release management tool that you will fall in love with. I have gained confidence in my role and has given me the ability to view release management from a whole different perspective.”

Faizan Ali

Faizan Ali
Salesforce Consultant at Turnitin