Newer Version Available

This content describes an older version of this product. View Latest

CustomPageWebLink

Represents a web link defined in a home page component. This type extends the Metadata metadata type and inherits its fullName field. All other web links are stored as a Weblink in a CustomObject.

Declarative Metadata File Suffix and Directory Location

There is one file per web link definition, stored in the weblinks folder in the corresponding package directory. The file suffix is .weblink.

Version

CustomPageWebLinks are available in API version 13.0 and later.

Fields

The CustomPageWebLink definition has the following fields:

Field Name Field Type Description
availability WebLinkAvailability (enumeration of type string) Required. Indicates whether the Weblink is only available online (online, or if it is also available offline (offline).
description string A description of the Weblink.
displayType WebLinkDisplayType (enumeration of type string) Represents how this Weblink is rendered.

Valid values:

  • link for a hyperlink
  • button for a button
  • massAction for a button attached to a related list
encodingKey Encoding (enumeration of type string) Required. The default encoding setting is Unicode: UTF-8. Change the default encoding setting if the target of a link requires data in a different format. This is available if your Content Source is URL.

Valid values include:

  • UTF-8: “Unicode (UTF-8)” in the UI
  • ISO-8859-1: “General US & Western Europe (ISO-8859–1, ISO-LATIN-1)” in the UI
  • Shift_JIS: “Japanese (Shift-JIS)” in the UI
  • ISO-2022-JP: “Japanese (JIS)” in the UI
  • EUC-JP: “Japanese (EUC)” in the UI
  • ks_c_5601-1987: “Korean (ks_c_5601–1987)” in the UI
  • Big5: “Traditional Chinese (Big5)” in the UI
  • GB2312: “Simplified Chinese (GB2312)” in the UI
  • BIG5-HKSCS: “Traditional Chinese Hong Kong (Big5–HKSCS)” in the UI
  • x-SJIS_0213: “Japanese (Shift-JIS_2004)” in the UI
fullName string The name used as a unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
hasMenubar boolean If the openType is newWindow, whether to show the browser menu bar for the window (true or not (false). Otherwise this field should not be specified.
hasScrollbars boolean If the openType is newWindow, whether to show the scroll bars for the window (true) or not (false). Otherwise this field should not be specified.
hasToolbar boolean If the openType is newWindow, whether to show the browser toolbar for the window (true) or not (false). Otherwise this field should not be specified.
height int Height in pixels of the window opened by this Weblink. Required if the openType is newWindow, otherwise should not be specified
isResizable boolean If the openType is newWindow, whether to allow resizing of the window (true) or not (false). Otherwise this field should not be specified.
linkType WebLinkType (enumeration of type string) Required. Represents whether the content of this Weblink is specified by a URL, an sControl, a JavaScript code block, or a Visualforce page.
Valid values:
  • url
  • sControl
  • javascript
  • page
  • flow—Reserved for future use.
masterLabel string The master label for the Weblink.
openType WebLinkWindowType (enumeration of type string) Required. When this button is clicked, specifies the window style that will be used to display the content.

Valid values:

  • newWindow
  • sidebar
  • noSidebar
  • replace
  • onClickJavaScript
page string If the value of linkType is page, this field represents the Visualforce page; otherwise, this field should not be specified.
position WebLinkPosition (enumeration of type string) If the openType is newWindow, how the new window should be displayed. Otherwise this field should not be specified.

Valid values:

  • fullScreen
  • none
  • topLeft
protected boolean Required. Indicates whether this component is protected (true) or not (false). Protected components cannot be linked to or referenced by components created in the installing organization.
requireRowSelection boolean If the openType is massAction, whether to require individual row selection to execute the action for this button (true) or not (false). Otherwise this field should not be specified.
scontrol string If the value of linkType is sControl, this field represents the name of the sControl; otherwise, this field should not be specified.
showsLocation boolean If the openType is newWindow, whether or not to show the browser location bar for the window; otherwise this field should not be specified.
showsStatus boolean If the openType is newWindow, whether or not to show the browser status bar for the window. Otherwise, this field should not be specified.
url string

If the value of linkType is url, this is the URL value. If the value of linkType is javascript, this is the JavaScript content. If the value neither of these, the this field should not be specified.

Content must be escaped in a manner consistent with XML parsing rules.

width int Width in pixels of the window opened by this Weblink.

Required if the openType is newWindow, otherwise should not be specified.

Declarative Metadata Sample Definition

The following is the definition of a Weblink. For related samples, see HomePageComponent and HomePageLayout.