Salesforce Custom Metadata Types for ISV apps

Salesforce.com Custom Metadata Types are around for over 2 years. If you are a Salesforce.com ISV and still not using Custom Metadata Types in your apps – you must consider the same.

What are Salesforce.com Custom Metadata Types?

Salesforce.com Custom Metadata Types are similar to custom settings (sometimes confused with them) – but they store the custom metadata instead of data. The advantage is that you can deploy them to production from a sandbox using change sets or as an ISV you can package them with your product.

Salesforce Custom Metadata Types

The records in Custom Metadata Types are considered as Metadata and unlike custom setting these can be deployed. To deploy custom settings data you are normally required to write the post install scripts. With Custom Metadata Types it can be done without writing any code.

Why use Custom Metadata Types?

You can make unlimited calls to Custom Metadata Types. And since all the records are cached (like custom settings) you will not have the performance issues. The data of Custom Metadata Types is deploy-able – so no additional effort after the deployment or no additional script after the installation of package.

More number of field options like pick-list, metadata relationship, long text are available with Custom Metadata Types. You can create validation rules and page layouts for the Custom Metadata Types. Separate permissions for setting up the Custom Metadata Types and updating the records.

When to still use Custom settings?

If you are storing any test credentials – use the custom settings as the test credentials will not passed to production. While the Custom Metadata Types will replace well list setting, if you have hierarchical custom settings then keep using the custom settings.

Further reading

Refer Custom Metadata Types implementation guide for more details. There is also a Trail-head module on Custom Metadata Types.

Note: If you are an ISV looking for evaluating the use of Custom Metadata Types in your app – we can help. We are a leading provider of Salesforce development services to ISVs. Connect with us for a free / no obligation discussion and assessment on Custom Metadata Types for your app.