HomePageComponent

Represents the metadata associated with a home page component. You can customize the Home tab in Salesforce Classic to include components such as sidebar links, a company logo, a dashboard snapshot, or custom components that you create. Use to create, update, or delete home page component definitions.

For more information, see “Salesforce Classic Home Tab Page Layouts” in the Salesforce Help.

This metadata type represents the valid values that define a home page component:

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

The file suffix for home page components is .homePageComponent and components are stored in the homepagecomponents directory of the corresponding package directory.

Version 

Home page components are available in API version 12.0 and later.

Fields 

body 

  • Type: string
  • Required: No
  • Description: The text body inside the HTML page component.

fullName 

  • Type: string

  • Required: No

  • Description: The name can only contain characters, letters, and the underscore (_) character. The name must start with a letter, and can’t end with an underscore or contain two consecutive underscore characters.

    Inherited from the Metadata component, this field isn’t defined in the WSDL for this component. It must be specified when creating, updating, or deleting. See create() to see an example of this field specified for a call.

height 

  • Type: int
  • Required: No
  • Introduced: API version 31.0
  • Description: Required for Visualforce Area components. Indicates the height (in pixels) of the component.

links 

  • Type: string (enumeration of type string)[]
  • Required: No
  • Description: If the pageComponentType is links, then zero or more names of custom page links can be specified.
  • Possible values:
    • ObjectWebLink
    • CustomPageWebLink

page 

  • Type: string
  • Required: No
  • Introduced: API version 31.0
  • Description: This field is only available for Visualforce Area components and indicates the API name of the Visualforce page that is associated with the component.

pageComponentType 

  • Type: PageComponentType (enumeration of type string)
  • Required: Yes
  • Description: Required.
  • Possible values:
    • links
    • htmlArea
    • imageOrNote
    • visualforcePage — (This value is available in API version 31.0 and later.)

showLabel 

  • Type: boolean
  • Required: No
  • Introduced: API version 31.0
  • Description: This field is only available for Visualforce Area components and specifies whether the component displays with a label (true) or not (false).

showScrollbars 

  • Type: boolean
  • Required: No
  • Introduced: API version 31.0
  • Description: This field is only available for Visualforce Area components and specifies whether the component displays with scrollbars (true) or not (false).

width 

  • Type: PageComponentWidth (enumeration of type string)
  • Required: No
  • Description: This field is only available for HTML and Visualforce Area components, and indicates whether it’s a narrow or wide home page component.
  • Possible values:
    • narrowComponents
    • wideComponents

Declarative Metadata Sample Definition 

The following is the definition of a home page component. See Declarative Metadata Sample Definition and Declarative Metadata Sample Definition for related samples.

1<?xml version="1.0" encoding="UTF-8"?>
2<HomePageComponent xmlns="http://soap.sforce.com/2006/04/metadata">
3  <height>200</height>
4  <page>MyVisualforcePage</page>
5  <pageComponentType>visualforcePage</pageComponentType>
6  <showLabel>true</showLabel>
7  <showScrollbars>true</showScrollbars>
8  <width>wideComponents</width>
9</HomePageComponent>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.