Apex Developer Guide
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Spring '17 (API version 39.0)
Winter '17 (API version 38.0)
Summer '16 (API version 37.0)
Spring '16 (API version 36.0)
Winter '16 (API version 35.0)
Summer '15 (API version 34.0)
Spring '15 (API version 33.0)
Winter '15 (API version 32.0)
Spring '14 (API version 30.0)
DeployProblemType Enum
DeployStatus Enum
FeedItemTypeEnum Enum
FeedLayoutComponentType Enum
FeedLayoutFilterPosition Enum
FeedLayoutFilterType Enum
LayoutHeader Enum
LayoutSectionStyle Enum
MetadataType Enum
PlatformActionListContextEnum Enum
PlatformActionTypeEnum Enum
ReportChartComponentSize Enum
SortOrder Enum
StatusCode Enum
SummaryLayoutStyleEnum Enum
UiBehavior Enum
Glossary
Newer Version Available
Metadata Namespace
The Metadata namespace provides classes and
methods for working with custom metadata in Salesforce
Salesforce uses metadata types and components to represent org configuration and customization. Metadata is used for org settings that admins control or configuration information applied by installed apps and packages. Use the classes in the Metadata namespace to access metadata from within Apex code.
Metadata access in Apex is available for Apex classes using API version 40.0 and later.
For more information, see Metadata.
The following are the classes in the Metadata namespace.
-
AnalyticsCloudComponentLayoutItem Class
Represents the settings for a Wave Analytics dashboard on a standard or custom page. -
ConsoleComponent Class
Represents a custom console component on a section of a page layout. -
Container Class
Represents a location and style in which to display more than one custom console component in the sidebars of the console. -
CustomConsoleComponents Class
Represents custom console components (Visualforce pages, lookup fields, or related lists) on a page layout. -
CustomMetadata Class
Represents records of custom metadata types. -
CustomMetadataValue Class
Represents custom metadata values for a custom metadata component. -
DeployCallback Interface
An interface for metadata deployment callback classes. -
DeployCallbackContext Class
Represents context information for a deployment job. -
DeployContainer Class
Represents a container for custom metadata components to be deployed. -
DeployDetails Class
Contains detailed information on deployed components. -
DeployMessage Class
Represents result information for the deployment of a metadata component. -
DeployProblemType Enum
Describes the problem type for an unsuccessful component deploy. -
DeployResult Class
Represents the results of a metadata deployment. -
DeployStatus Enum
The result status of a deployment. -
FeedItemTypeEnum Enum
The type of feed item in a feed-based page layout. -
FeedLayout Class
Represents the values that define the feed view of a feed-based page layout. Feed-based layouts are available on Account, Case, Contact, Lead, Opportunity, custom, and external objects. They include a feed view and a detail view. -
FeedLayoutComponent Class
Represents a component in the feed view of a feed-based page layout. -
FeedLayoutComponentType Enum
Indicates the type of feed layout component. -
FeedLayoutFilter Class
Represents a feed filter option in the feed view of a feed-based page layout. A filter can have only standardFilter or feedItemType set. -
FeedLayoutFilterPosition Enum
Describes where the feed filters list is included in the layout. -
FeedLayoutFilterType Enum
The type of feed layout filter. -
Layout Class
Represents the metadata associated with a page layout. -
LayoutColumn Class
Represents the items in a column within a layout section. -
LayoutHeader Enum
Represents tagging types used for Metadata.Layout.headers -
LayoutItem Class
Represents the valid values that define a layout item. -
LayoutSection Class
Represents a section of a page layout, such as the Custom Links section. -
LayoutSectionStyle Enum
Describes the possible styles for a layout section. -
Metadata Class
An abstract base class that represents a custom metadata component. -
MetadataType Enum
Represents the custom metadata components available in Apex. -
MetadataValue Class
An abstract base class that represents a custom metadata component field. -
MiniLayout Class
Represents a mini view of a record in the Console tab, hover details, and event overlays. -
Operations Class
Represents a class to execute metadata operations, such as retrieving or deploying custom metadata. -
PlatformActionList Class
Represents the list of actions, and their order, that display in the Salesforce mobile action bar for the layout. -
PlatformActionListContextEnum Enum
Describes the different contexts of action lists. -
PlatformActionListItem Class
Represents an action in the platform action list for a layout. -
PlatformActionTypeEnum Enum
The type of action for a PlatformActionListItem. -
PrimaryTabComponents Class
Represents custom console components on primary tabs in the Salesforce console. -
QuickActionList Class
Represents the list of actions associated with the page layout. -
QuickActionListItem Class
Represents an action in the QuickActionList. -
RelatedContent Class
Represents the Mobile Cards section of the page layout. -
RelatedContentItem Class
Represents an individual item in the RelatedContent list. -
RelatedList Class
Represents related list custom components on the sidebars of the Salesforce console. -
RelatedListItem Class
Represents an item in the related list in a page layout. -
ReportChartComponentLayoutItem Class
Represents the settings for a report chart on a standard or custom page. -
ReportChartComponentSize Enum
Describes the size of the displayed report chart component. -
SidebarComponent Class
Represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the Salesforce console. -
SortOrder Enum
Describes the sort order of a related list. -
StatusCode Enum
Describes the status code for an unsuccessful component deploy. -
SubtabComponents Class
Represents custom console components on subtabs in the Salesforce console. -
SummaryLayoutStyleEnum Enum
Describes the highlights panel style for a SummaryLayout. -
SummaryLayout Class
Controls the appearance of the highlights panel, which summarizes key fields in a grid at the top of a page layout, when Case Feed is enabled. -
SummaryLayoutItem Class
Controls the appearance of an individual field and its column and row position within the highlights panel grid, when Case Feed is enabled. You can have two fields per each grid in a highlights panel. -
UiBehavior Enum
Describes the behavior for a layout item on a layout page.