HomePageComponent
For more information, see “Salesforce Classic Home Tab Page Layouts” in the Salesforce Help.
This type extends the Metadata metadata type and inherits its fullName field.
Declarative Metadata 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.
HomePageComponent
This metadata type represents the valid values that define a home page component:
Field Name | Field Type | Description |
---|---|---|
body | string | The text body inside the HTML page component. |
fullName | string | 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 | int | Required for Visualforce Area components. Indicates the height (in pixels) of
the component. This field is available in API version 31.0 and later. |
links | string[] | If the pageComponentType is links, then zero or more names of custom page links can be specified.
|
page | string | This field is only available for Visualforce Area components and indicates the
API name of the Visualforce page that is associated with the component. This field is available in API version 31.0 and later. |
pageComponentType | PageComponentType (enumeration of type string) | Required. Valid values are:
|
showLabel | boolean | This field is only available for Visualforce Area components and specifies
whether the component displays with a label (true) or not (false). This field is available in API version 31.0 and later. |
showScrollbars | boolean | This field is only available for Visualforce Area components and specifies
whether the component displays with scrollbars (true) or not (false). This field is available in API version 31.0 and later. |
width | PageComponentWidth (enumeration of type string) | This field is only available for HTML and Visualforce Area components, and
indicates whether it’s a narrow or wide home page component. Valid values are:
|
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.
<?xml version="1.0" encoding="UTF-8"?>
<HomePageComponent xmlns="http://soap.sforce.com/2006/04/metadata">
<height>200</height>
<page>MyVisualforcePage</page>
<pageComponentType>visualforcePage</pageComponentType>
<showLabel>true</showLabel>
<showScrollbars>true</showScrollbars>
<width>wideComponents</width>
</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.