17

I was looking through the working of VF page I read that it save the instruction as metadata. Can any body explain me in simple words that what is metadata.

18

Metadata is basically "data that describes other data".

For example, in Salesforce you can query data like this:

SELECT FirstName FROM Contact WHERE FirstName='Mike'

Salesforce also provides metadata tables that describe code and configuration:

SELECT Id FROM ApexClass WHERE ApiVersion < 25

The Metadata API provides even more detail about code, objects, profiles, reports, and many more items http://www.salesforce.com/us/developer/docs/api_meta/index.htm

The Force.com IDE for Eclipse plug-in uses the Metadata API to keep local files in sync with Salesforce.

| improve this answer | |
20

I prefer something very simple when it comes to Salesforce and similar tools:

metadata = configuration data

If it isn't your data (accounts, contacts, etc.) or system data (chatter, sharing, field history, etc.) and it configures something about how your salesforce org behaves, then it is metadata in this system.

I have never felt the classic RDBMS "data about your data" definition told the whole story. It is partly correct where it comes to objects, fields, relationships, etc. But some SFDC metadata also defines how UI, business process, validation, programmatic features and other things behave, and fundamentally, that isn't "data about your data". That is data about how the system needs to behave.

| improve this answer | |
  • Does a new salesforce org (e.g. the new "scratch org") have any foundational "boilerplate" metadata in it, or, does metadata begin to exist only after I start to customize it? (e.g. only after I add my first APEX class, or custom schema object) – bkwdesign Mar 7 '19 at 17:28
5

Salesforce describes the Metadata API as follows:

Use Metadata API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your organization. This API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself.

I think of Salesforce Metadata like DDL for databases; it is used to describe your objects, their fields and other properties. It also can be used to describe page layouts, profiles, reports and other aspects of your org. As Jordan has pointed out, you can download this description as XML files.

You are limited in what can be set by Metadata; you can't use it to populate Public Groups or change how sharing settings on objects, for instance. It is useful for documenting your org and tracking changes since the XML can be stored in any change control system.

| improve this answer | |
4

Metadata is an XML file that contains the specifications to the compiler and VF runtime of what API version should be used to render the page, what the page is called, and that the file in question is a VF pages, versus something else (class, static resource, etc.)

| improve this answer | |
4

Metadata in normal database concept is the data about your tables, databases etc. Like how many tables are there in database? How many columns are in table? What are the types of column in table etc.

Same in Salesforce, internally it is Hibernate kind of architect to and gives sObject instead of row.

So, Metadata in Salesforce gives us the information about your organization like : Total number and name of Workflows, Email Templates, sObjects, Page Layouts etc.

We have a Metadata webservice (Metadata WSDL) provided by Salesforce. Metadata can be used with combination of Java or C# or any other language for tasks like creating Custom Object, Creating profile, Creating fields, fetching complete object list etc.

The Eclipse IDE, ANT Migration tool, Dataloader and other client based tools are actually using Metadata API internally to perform these tasks.

| improve this answer | |
  • 1
    I was kind of surprised to hear that Salesforce uses Hibernate. Can you post a link to a Salesforce page (or wherever you found that out) that documents Salesforce's architecture? I'd be interested in learning more. Thanks! – Peter Knolle Sep 7 '12 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.