---
schema_version: "1"
id: ad120aece15e023651b6c5adb2c9f2ec76a0ee8834ec7c60d5bb90ee03b8fbdc
title: MiniLayout Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_MiniLayout.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_MiniLayout.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6ea921f635ea9373068a7610b662ec6301284011bc7590a65a8d03d484ec6214
description: Represents a mini view of a record in the Console tab, hover details, and event overlays.The fields for the mini-layout, listed in the order they appear in the UI. Fields that appear in the mini-layout must appear in the main layout.The mini related lists, listed in the order they appear in the UI. You cannot set sorting on mini related lists. Fields that appear in the mini related lists must appear in the main layout.Makes a duplicate copy of the Metadata.MiniLayout.
---
# MiniLayout Class

Represents a mini view of a record in the Console tab, hover details, and event overlays.

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

- **[MiniLayout Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_MiniLayout.htm#apex_Metadata_MiniLayout_properties)**
- **[MiniLayout Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_MiniLayout.htm#apex_Metadata_MiniLayout_methods)**

## MiniLayout Properties

The following are properties for MiniLayout.

- **[fields](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_MiniLayout.htm#apex_Metadata_MiniLayout_fields)**  
    The fields for the mini-layout, listed in the order they appear in the UI. Fields that appear in the mini-layout must appear in the main layout.
- **[relatedLists](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_MiniLayout.htm#apex_Metadata_MiniLayout_relatedLists)**  
    The mini related lists, listed in the order they appear in the UI. You cannot set sorting on mini related lists. Fields that appear in the mini related lists must appear in the main layout.

### fields

The fields for the mini-layout, listed in the order they appear in the UI. Fields that appear in the mini-layout must appear in the main layout.

#### Signature

public List<String\> fields {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.")<[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

The mini related lists, listed in the order they appear in the UI. You cannot set sorting on mini related lists. Fields that appear in the mini related lists must appear in the main layout.

#### Signature

public List<Metadata.RelatedListItem> 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.RelatedListItem](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_RelatedListItem.htm#apex_class_Metadata_RelatedListItem "Represents an item in the related list in a page layout.")\>

## MiniLayout Methods

The following are methods for MiniLayout.

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

### clone()

Makes a duplicate copy of the Metadata.MiniLayout.

#### Signature

public Object clone()

#### Return Value

Type: Object