---
schema_version: "1"
id: f4b9dca53a9bf538ca7b49f48c40423ec6d15d4bc732fa3257b5d014a0618541
title: SidebarComponent Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_SidebarComponent.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a033bbd3bc36399952dfb546affe2fc6fd11a07d30366418e527d368519408fb
description: Represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the Salesforce console.Specifies the component type. Valid values are “KnowledgeOne”, “Lookup”, “Milestones”, “RelatedList”, “Topics”, “Files”, and “CaseExperts”. If the component is a lookup field, the name of the quick action used to create a record.If the component is a lookup field, lets users associate a record with this field.The height of the component in the container. The unit property determines the unit of measurement, in pixels or percent.Indicates if the component is enabled for Knowledge One.The name of the component as it displays to console users. Available for components in a container with the style of tabs or accordion.If the component is a lookup field, the name of the field.If the component is a Visualforce page, the name of the Visualforce page.If the component is a related list component, the list of related list names.The unit of measurement (pixels or percent) for the height and width of the component in the container.If the component is a lookup field, the name of the quick action used to update a record.The width of the component in the container. The unit property determines the unit of measurement, in pixels or percent.Makes a duplicate copy of the Metadata.SidebarComponent.
---
# 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.

## Namespace

[Metadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Metadata.htm "The Metadata namespace provides classes and methods for working with custom metadata in Salesforce")

## Usage

Use this class when accessing [Metadata.Layout](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Layout.htm#apex_class_Metadata_Layout "Represents the metadata associated with a page layout.") metadata components. For more information, see “SidebarComponent” in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_intro.htm).

- **[SidebarComponent Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_properties)**
- **[SidebarComponent Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_methods)**

## SidebarComponent Properties

The following are properties for SidebarComponent.

- **[componentType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_componentType)**  
    Specifies the component type. Valid values are “KnowledgeOne”, “Lookup”, “Milestones”, “RelatedList”, “Topics”, “Files”, and “CaseExperts”.
- **[createAction](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_createAction)**  
    If the component is a lookup field, the name of the quick action used to create a record.
- **[enableLinking](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_enableLinking)**  
    If the component is a lookup field, lets users associate a record with this field.
- **[height](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_height)**  
    The height of the component in the container. The unit property determines the unit of measurement, in pixels or percent.
- **[knowledgeOneEnable](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_knowledgeOneEnable)**  
    Indicates if the component is enabled for Knowledge One.
- **[label](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_label)**  
    The name of the component as it displays to console users. Available for components in a container with the style of tabs or accordion.
- **[lookup](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_lookup)**  
    If the component is a lookup field, the name of the field.
- **[page\_x](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_page_x)**  
    If the component is a Visualforce page, the name of the Visualforce page.
- **[relatedLists](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_relatedLists)**  
    If the component is a related list component, the list of related list names.
- **[unit](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_unit)**  
    The unit of measurement (pixels or percent) for the height and width of the component in the container.
- **[updateAction](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_updateAction)**  
    If the component is a lookup field, the name of the quick action used to update a record.
- **[width](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_width)**  
    The width of the component in the container. The unit property determines the unit of measurement, in pixels or percent.

### componentType

Specifies the component type. Valid values are “KnowledgeOne”, “Lookup”, “Milestones”, “RelatedList”, “Topics”, “Files”, and “CaseExperts”.

#### Signature

public String componentType {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### createAction

If the component is a lookup field, the name of the quick action used to create a record.

#### Signature

public String createAction {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### enableLinking

If the component is a lookup field, lets users associate a record with this field.

#### Signature

public Boolean enableLinking {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### height

The height of the component in the container. The unit property determines the unit of measurement, in pixels or percent.

#### Signature

public Integer height {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### knowledgeOneEnable

Indicates if the component is enabled for Knowledge One.

#### Signature

public Boolean knowledgeOneEnable {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### label

The name of the component as it displays to console users. Available for components in a container with the style of tabs or accordion.

#### Signature

public String label {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### lookup

If the component is a lookup field, the name of the field.

#### Signature

public String lookup {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### page\_x

If the component is a Visualforce page, the name of the Visualforce page.

#### Signature

public String page\_x {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### relatedLists

If the component is a related list component, the list of related list names.

#### Signature

public List<Metadata.RelatedList> relatedLists {get; set;}

#### Property Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[Metadata.RelatedList](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm#apex_class_Metadata_RelatedList "Represents related list custom components on the sidebars of the Salesforce console.")\>

### unit

The unit of measurement (pixels or percent) for the height and width of the component in the container.

#### Signature

public String unit {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### updateAction

If the component is a lookup field, the name of the quick action used to update a record.

#### Signature

public String updateAction {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### width

The width of the component in the container. The unit property determines the unit of measurement, in pixels or percent.

#### Signature

public Integer width {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

## SidebarComponent Methods

The following are methods for SidebarComponent.

- **[clone()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_SidebarComponent.htm#apex_Metadata_SidebarComponent_clone)**  
    Makes a duplicate copy of the Metadata.SidebarComponent.

### clone()

Makes a duplicate copy of the Metadata.SidebarComponent.

#### Signature

public Object clone()

#### Return Value

Type: Object