We have all heard about metadata but what is it really? Metadata is information about
your data. Clear as mud?
Here is a simple example to help you understand it.
Here is some information ( 18005552354 ). Just by looking at it you might guess it is a phone number but it could be anything – a phone number, an account number, a help desk ticket number, etc.
Metadata provides information about that data to help you understand it.
Phone: 18005552354 OR Ticket number: 18005552354
Both “phone” and “ticket number” are considered metadata because it is providing information about that string of numbers.
Why is it important?
So big deal there is metadata. Why is it important to have it defined? Its importance shows up when you need to change something, fix a problem or bring a new person up to speed quickly. You can also use metadata during future analysis and design activities.
A few years ago I moved into a new position where I was supporting an application built on Force.com. Since I couldn’t find any documentation or only a few bits and pieces I turned to the metadata to understand things.
Ninety percent of the fields had no definition and many labels were not very informative. So I had to reach out to a number of people and basically interview them to get the information I needed to understand the application. If good metadata had been available it would have saved a lot of people a lot of time and effort.
Types of Metadata
Metadata comes in all shapes in sizes. Just remember that it is information about the data or function in your application. Below are a few types of metadata. This is not an exhaustive list.
- Meaningful Labels (used on columns, fields, tables, table relationships, etc)
- Definitions (used to further clarify labels and other things)
- Field datatypes (number, string, email address, text, percent, currency, etc)
- Other field clarifications (unique, required/optional)
- Entity Relationship Diagrams
- Application documentation
What can I do about it?
As a Salesforce Citizen Developer document as you go.
Labels: Make all names for objects, fields, validation rules, child relationship names, etc. meaningful so that users get a clear idea of what data is there or what function it performs by the name.
Descriptions: If the component (object, field, rule, etc.) allows for a description, add one. Be clear and concise but provide enough information for the user to understand what data it contains or what function is being performed. DO NOT LEAVE BLANK.
Comments in Code: Make sure anything coded (triggers, apex classes, visualforce pages) has comments sprinkled throughout explaining what the user is seeing.
Knowledge base: If you have access to Salesforce Knowledge, add FAQ information, application documentation, details on processes and more. If you don’t have Salesforce Knowledge, keep the information in a shared space using spreadsheets, documents or other formats. Just remember to keep it up to date as things change.
What situations have you encountered where good metadata was present or lack of metadata made the work harder?