Skip to main content

Let's settle the debate between Custom Metadata, Custom Objects and Custom Settings

This is a common scenario in any design meeting. First, you have the one person who recommends using Custom Metadata for something that clearly should be a Custom Object. But custom metadata can be deployed using the release pipeline, and it's easy. Why do we create too many custom objects? Knowing the purpose behind these features is essential to use them effectively.

Let's start with custom settings. These bad boys are like the steroids of your application, allowing you to store information such as default values, external service endpoints, or other data that needs to be accessed at warp speed. Thanks to custom settings being cached in memory, they're always ready to go when needed. Plus, they can be accessed by Apex classes, Visualforce pages, and formula fields, making them the perfect tool for storing data that needs to be accessed quickly.

Next up, custom metadata types. These are like the blueprints of your application, allowing you to control your application based on its value. Custom metadata is perfect for storing information that needs to be accessed by Apex classes, Visualforce pages, formula fields and validation rules. Still, it's meant to keep only a small amount of data. Think of it as the blueprint of your application, giving you a clear and organized structure for your data. One of the biggest arguments for this is that it can be moved as metadata during deployment in SFDX, but we have to understand that choosing a feature is not a decision made to make the life of a tech team easy but better for the system.

Finally, we have custom objects. These are the powerhouses of your application, allowing you to store data specific to your organization. They're great for storing information such as customers, products, or other data that must be kept in Salesforce. Custom objects can be accessed by Apex classes, Visualforce pages, and formula fields, and they can also be used to create custom tabs, reports, and dashboards. They're the perfect tool for storing large amounts of data and giving your application the structure and power it needs to knock the socks off of your users.

In short, custom settings are your steroids, custom metadata is your blueprint, and custom objects are your powerhouses. Understanding when to use each one will help you create better Salesforce applications. What do you think?


Popular Post

The unofficial guide to become a Certified Salesforce Administrator (ADM 201)

In my attempt at maximum certifications in 60 days, I completed Salesforce Certified Administrator exam on February 11th 2013 So you have decided to ramp up your career and take certifications in your hand. Good choice. It is also likely that this is the first time you have heard of Salesforce, certification and since your company has a vision of you completing the certification you have decided to do it. At this stage it is likely that, You have done extensive googling. You have received countless brain-dumps. And you have received plenty of advise from different types of users which ranges from Admin certification is easier than making coffee to Admin certification is tougher than building a rocket-ship to fly off to the moon. The purpose of this guide is to give you a clear understanding of what to expect when you are expected to become Certified Salesforce Administrator. To bring sense to all the things you have seen so far and to clearly explain what to do and what

Some PDF tricks on Visualforce: Landscape, A4, page number and more

The beauty of Visualforce is simplicity. Remember the shock you received when you were told the entire page renders as PDF if you just add renderAs=PDF to the Page tag. For those who thought I spoke alien language right now, here is the trick, to render a page as PDF, we add a simple attribute to the <apex: page> tag <apex: page renderAs='pdf'> This will render the entire page as PDF. Now, say we need to add some extra features to the PDF. Like a page number in the footer or we need to render the page in landscape mode. Faced with this problem, I put on my Indiana Jones hat and went hunting for it in the vast hay-sack of the internet (read: googled extensively). Imagine my happiness when i found a big big page with many big big examples to solve the problem. The document I am referring to is from W3C, paged Box media . Long story short, I now possess the ultimate secret of rendering the page in any format I want. So here are few tricks I learned from the p

The Basics of writing a Apex Trigger

One of the most important and common asked question on Forums and everywhere is how do I write a trigger. Coding in Apex Trigger is like going to a dentist for a root canal, you keep dreading the moment until you realize it is actually not going to hurt you. If you plan to write an Apex Trigger this quick guide will help you doing so. The first and foremost rule in writing a trigger is to remember the oldest suggestion given to the most comprehensive Hitchhikers Guide to Galaxy, ' Don't Panic. ' Writing a trigger is not a rocket science, in-fact we should thank the team at Salesforce and ForceDotCom for making everything so simple, that anyone can do it. Enough of talk, lets code. So you want to write a trigger. Let us have a glimpse of what we are going to build. The problem statement is as follows Problem:  When the User is entering the Opportunity, check for the Opportunity Amount. If the Opportunity Amount is greater than 50,000. Mark the Parent Account as