Salesforce Metadata API -“Way to access anything in Salesforce”

ABHINAV JAIN
Cloudwerx
Published in
6 min readJun 29, 2021

--

Metadata is nothing but Data about the Data. “Metadata is data that describes other data”

A simple example in Salesforce for fields, it would be data type of the field, for a picklist the values it contains, also specification information like : restricted, trackHistory, externalid, etc.

Metadata API

Metadata API can be used to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts.It can be used to access things programmatically that were previously not accessible. We can create fields or update their specifications directly from Apex code. Metadata API can be used from third parties like Java with the help of SOAP and REST APIs.

Metadata API Uses:

  1. Let’s say that you support multiple orgs, and you’ve created a custom field. You want to add your new field to the page layouts in all your orgs. This type of configuration information is stored in metadata types and components in your org.
  2. You can create a script that uses Apex Metadata API to add your new field to the page layouts in all your orgs directly from Apex. The metadata in the orgs is updated behind the scenes, so that your admins don’t have to make manual changes in…

--

--

ABHINAV JAIN
Cloudwerx

An aspiring Researcher . I like solving problems with with the help of technology.