---
schema_version: "1"
id: 7cbfda10262aa7a8dc205f42b8e6ad4d709e717d386d5d7e71c6876c8fa1f768
title: RelatedList Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_RelatedList.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f5db196d413a13fd1848a78a3383698b162303d6a876ed6efcd069523cbb82f3
description: Represents related list custom components on the sidebars of the Salesforce console.When set to true, the related list is hidden from detail pages where it appears as a component to prevent duplicate information from showing.The name of the component as it appears to console users.Makes a duplicate copy of the Metadata.RelatedList.
---
# RelatedList Class

Represents related list custom components on 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 “RelatedList” in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_intro.htm).

- **[RelatedList Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm#apex_Metadata_RelatedList_properties)**
- **[RelatedList Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm#apex_Metadata_RelatedList_methods)**

## RelatedList Properties

The following are properties for RelatedList.

- **[hideOnDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm#apex_Metadata_RelatedList_hideOnDetail)**  
    When set to true, the related list is hidden from detail pages where it appears as a component to prevent duplicate information from showing.
- **[name](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedList.htm#apex_Metadata_RelatedList_name)**  
    The name of the component as it appears to console users.

### hideOnDetail

When set to true, the related list is hidden from detail pages where it appears as a component to prevent duplicate information from showing.

#### Signature

public Boolean hideOnDetail {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.")

### name

The name of the component as it appears to console users.

#### Signature

public String name {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.")

## RelatedList Methods

The following are methods for RelatedList.

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

### clone()

Makes a duplicate copy of the Metadata.RelatedList.

#### Signature

public Object clone()

#### Return Value

Type: Object