Salesforce are once again staying true to one of their mottos, “Clicks, not code!”, with a release that is currently being tested on the pilot scheme.
Many admins have made custom metadata records to configure apps written by developers, but some have gone further — creating types as part of their own low/no code solutions. It’s best practice to avoid hard coding things such as Record IDs, Profile IDs and Names when creating automation and validation in Salesforce. This is due to the possibility of records changing over time, making your new and exciting functionality out of date before you know it. If you did choose to hardcode values, you would have to remember each instance of the value, in all of your processes, in order to update it. It’s really not very scalable at all.
This is where Custom Metadata Type Records will come into play.
Using Custom Metadata to hold things such as User IDs or job titles, you will be able to easily build formulas and validation that you can update effortlessly.
For example, a stakeholder asks you to stop Temps from editing certain fields on a record. Your Validation Rule wouldn’t work anymore if someone changed their job title from “Temp” to “Temporary”. By creating a Custom Metadata Type “Validation Rule Values” and a record with a value of “Temp”, this can soon be accessed by your Validation Rule.
To add to this, more values can be added to the Metadata. If the stakeholder comes back and asks for “Part Time” employees to be added to the list of restricted job titles, it’s as easy as creating a record!
Another added benefit is that everything is in one place. If a naming convention changes, you only have to update it once.
Both the Metadata Types and the Metadata Records themselves can be added to a Change Set and deployed between Sandboxes and your Production environment.
This is a very exciting announcement for any Admin, allowing them to build scalable solutions to everyday problems (which is always a good thing!).