WebLink

Represents a custom button or link.

Version 

Introduced in API version 34.0.

Available in the Tooling APIfrom API version 34.0 or later.

Supported SOAP API Calls 

describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search()

Supported REST API Methods 

GET, HEAD, Query

Fields 

Description 

  • Type: textarea

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 34.0

  • Description: A description of the button or link.

DisplayType 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort

  • Introduced: API version 34.0

  • Description: Represents how the button or link is rendered. Valid values are:

  • link for a hyperlink

  • button for a button

  • massActionButton for a button attached to a related list

  • Possible values:

    • L — Detail Page Link (default)

    • B — Detail Page Button

    • M — List Button

  • Default value: L

EncodingKey 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: Valid values include:

  • UTF-8—Unicode (UTF-8)

  • ISO-8859-1—General US & Western Europe (ISO-8859–1, ISO-LATIN-1)

  • Shift_JIS—Japanese (Shift-JIS)

  • ISO-2022-JP—Japanese (JIS)

  • EUC-JP—Japanese (EUC-JP)

  • x-SJIS_0213—Japanese (Shift-JIS_2004)

  • ks_c_5601-1987—Korean (ks_c_5601-1987)

  • Big5—Traditional Chinese (Big5)

  • GB2312—Simplified Chinese (GB2312)

  • Big5-HKSCS—Traditional Chinese Hong Kong (Big5–HKSCS)

  • Possible values:

    • UTF-8 — Unicode (UTF-8)

    • ISO-8859-1 — General US & Western Europe (ISO-8859-1, ISO-LATIN-1)

    • Shift_JIS — Japanese (Shift-JIS)

    • ISO-2022-JP — Japanese (JIS)

    • EUC-JP — Japanese (EUC)

    • ks_c_5601-1987 — Korean (ks_c_5601-1987)

    • Big5 — Traditional Chinese (Big5)

    • GB2312 — Simplified Chinese (GB2312)

    • Big5-HKSCS — Traditional Chinese Hong Kong (Big5-HKSCS)

    • x-SJIS_0213 — Japanese (Shift-JIS_2004)

EntityDefinitionId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Introduced: API version 34.0

  • Description: Required. ID of the record associated with the button or link. The record’s object type is in EntityDefinition.

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Introduced: API version 34.0

  • Description: The full name of the associated metadata object in Metadata API.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

HasMenubar 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If OpenType is newWindow, this field indicates whether to show the browser menu bar for the popup window (true, or not (false). For other values of OpenType, don’t specify a value here.

  • Default value: false

HasScrollbars 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If the value of OpenType is newWindow, this field indicates whether to show the scroll bars for the window (true) or not (false). For other values of OpenType, don’t specify a value here.

  • Default value: false

HasToolbar 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If the value of OpenType is newWindow, this field indicates whether to show the browser toolbar for the window (true) or not (false). For other values of OpenType, don’t specify a value here.

  • Default value: false

Height 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Required if the value of OpenType is newWindow. Height in pixels of the window opened by the button or link. For other values of OpenType, don’t specify a value here.

IsResizable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If the value of OpenType is newWindow, this field indicates whether to allow resizing of the window (true) or not (false). For other values of OpenType, don’t specify a value here.

  • Default value: false

LinkType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Introduced: API version 34.0

  • Description: Required. Represents whether the content of the button or link is specified by a URL, an sControl, a JavaScript code block, or a Visualforce page.

  • url

  • sControl

  • javascript

  • page

  • flow—Reserved for future use.

  • Possible values:

    • url — URL

    • sControl — Custom S-Control

    • javascript — OnClick JavaScript

    • page — Visualforce Page

    • flow — Flow Definition

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 8.0

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 34.0

  • Description: Master label for this object. This display value is the internal label that is not translated. Limit: 240 characters.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 34.0

  • Description: The metadata for this object as defined in the Metadata API.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

Name 

  • Type: string

  • Required: No

  • Properties: Filter, Group, idLookup, Sort

  • Introduced: API version 34.0

  • Description: Required. Name to display on the page.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 8.0

  • Description: The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values:

  • In Developer Edition organizations, the namespace prefix is set to the namespace prefix of the organization for all objects that support it. There is an exception if an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition organization of the package developer.
  • In organizations that are not Developer Edition organizations, NamespacePrefix is only set for objects that are part of an installed managed package. There is no namespace prefix for all other objects.

OpenType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Introduced: API version 34.0

  • Description: The window style used to display the content. Valid values are:

  • newWindow

  • sidebar

  • noSidebar

  • replace

  • onClickJavaScript

  • Possible values:

    • newWindow — Display in new window

    • sidebar — Display in existing window with sidebar

    • noSidebar — Display in existing window without sidebar

    • replace — Display in existing window without sidebar or header

    • onClickJavaScript — Execute JavaScript

Position 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: If the value of OpenType is newWindow, this field indicates how the new window should be displayed. Otherwise, don’t specify a value. Valid values are:

  • fullScreen

  • none

  • topLeft

  • Possible values:

    • fullScreen — fullScreen

    • none — none

    • topLeft — topLeft

RequireRowSelection 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 8.0

  • Description: If the value of OpenType is massAction, this field indicates whether to require individual row selection to execute the action for this button (true) or not (false). Otherwise, leave this field empty.

  • Default value: false

ScontrolId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Relationship name: ScontrolId

  • Relationship type: polymorphic

  • Refers to: ApexPage, FlowDefinition, Scontrol

ShowsLocation 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If the value of OpenType is newWindow, this field indicates whether to show the browser location bar for the window (true) or not (false). Otherwise, leave this field empty.

  • Default value: false

ShowsStatus 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Description: If the value of OpenType is newWindow, show the browser status bar for the window (true. Otherwise, don’t specify a value.

  • Default value: false

Url 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Introduced: API version 34.0

  • Description: Required. Represents the URL of the page to link to. Can include fields as tokens within the URL. Limit: 1,024 KB.

If the value of LinkType is url, this field represents the URL value. If the value of LinkType is javascript, this field represents the JavaScript content. For other values of LinkType, leave this field empty.

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

Width 

  • Type: int

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The width in pixels of the window opened by the button or link.

Required if the value of OpenType is newWindow. Otherwise, leave this field empty.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!