---
schema_version: "1"
id: 8bb2f542316a7cec252fc96f484496d5883ce10ae55079f59f20ba0f8e289697
title: LayoutItem Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_LayoutItem.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e3861604d79006613a9dbeecddbe3a54b858d75f0332e4d79509495c1a9a9afc
description: Represents the valid values that define a layout item.A Wave Analytics dashboard component on a page.Determines the field behavior.References a canvas app.References a component.The custom link reference.Controls if this layout item is a blank space.The field name reference, relative to the layout, for example “Description” or “MyField__c”.For s-controls and pages only, the height in pixels.Reference to a Visualforce page.Refers to a report chart that you can add to a standard or custom object page.Reference to an s-control.For s-control and pages only, whether to show the label.For s-control and pages only, whether to show scrollbars.For s-control and pages only, the width in pixels or percent. Pixel values are simply the number of pixels, for example, 500. Percentage values must include the percent sign, for example, 20%.Makes a duplicate copy of the Metadata.LayoutItem.
---
# LayoutItem Class

Represents the valid values that define a layout item.

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

- **[LayoutItem Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_properties)**
- **[LayoutItem Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_methods)**

## LayoutItem Properties

The following are properties for LayoutItem.

- **[analyticsCloudComponent](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_analyticsCloudComponent)**  
    A Wave Analytics dashboard component on a page.
- **[behavior](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_behavior)**  
    Determines the field behavior.
- **[canvas](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_canvas)**  
    References a canvas app.
- **[component](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_component)**  
    References a component.
- **[customLink](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_customLink)**  
    The custom link reference.
- **[emptySpace](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_emptySpace)**  
    Controls if this layout item is a blank space.
- **[field](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_field)**  
    The field name reference, relative to the layout, for example “Description” or “MyField\_\_c”.
- **[height](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_height)**  
    For s-controls and pages only, the height in pixels.
- **[page\_x](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_page_x)**  
    Reference to a Visualforce page.
- **[reportChartComponent](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_reportChartComponent)**  
    Refers to a report chart that you can add to a standard or custom object page.
- **[scontrol](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_scontrol)**  
    Reference to an s-control.
- **[showLabel](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_showLabel)**  
    For s-control and pages only, whether to show the label.
- **[showScrollbars](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_showScrollbars)**  
    For s-control and pages only, whether to show scrollbars.
- **[width](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_LayoutItem.htm#apex_Metadata_LayoutItem_width)**  
    For s-control and pages only, the width in pixels or percent. Pixel values are simply the number of pixels, for example, 500. Percentage values must include the percent sign, for example, 20%.

### analyticsCloudComponent

A Wave Analytics dashboard component on a page.

#### Signature

public Metadata.AnalyticsCloudComponentLayoutItem analyticsCloudComponent {get; set;}

#### Property Value

Type: [Metadata.AnalyticsCloudComponentLayoutItem](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_AnalyticsCloudComponentLayoutItem.htm#apex_class_Metadata_AnalyticsCloudComponentLayoutItem "Represents the settings for a Wave Analytics dashboard on a standard or custom page.")

### behavior

Determines the field behavior.

#### Signature

public Metadata.UiBehavior behavior {get; set;}

#### Property Value

Type: [Metadata.UiBehavior](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_Metadata_UiBehavior.htm#apex_enum_Metadata_UiBehavior "Describes the behavior for a layout item on a layout page.")

### canvas

References a canvas app.

#### Signature

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

### component

References a component.

#### Signature

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

### customLink

The custom link reference.

#### Signature

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

### emptySpace

Controls if this layout item is a blank space.

#### Signature

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

### field

The field name reference, relative to the layout, for example “Description” or “MyField\_\_c”.

#### Signature

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

### height

For s-controls and pages only, the height in pixels.

#### 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.")

### page\_x

Reference to a 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.")

### reportChartComponent

Refers to a report chart that you can add to a standard or custom object page.

#### Signature

public Metadata.ReportChartComponentLayoutItem reportChartComponent {get; set;}

#### Property Value

Type: [Metadata.ReportChartComponentLayoutItem](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_class_Metadata_ReportChartComponentLayoutItem "Represents the settings for a report chart on a standard or custom page.")

### scontrol

Reference to an s-control.

#### Signature

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

### showLabel

For s-control and pages only, whether to show the label.

#### Signature

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

### showScrollbars

For s-control and pages only, whether to show scrollbars.

#### Signature

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

### width

For s-control and pages only, the width in pixels or percent. Pixel values are simply the number of pixels, for example, 500. Percentage values must include the percent sign, for example, 20%.

#### Signature

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

## LayoutItem Methods

The following are methods for LayoutItem.

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

### clone()

Makes a duplicate copy of the Metadata.LayoutItem.

#### Signature

public Object clone()

#### Return Value

Type: Object