Custom Button and Link Fields
This table describes the fields that are available when you create a custom button or link.
Required Editions
| Available in: Salesforce Classic |
Custom buttons and links are available in: All Editions Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
| Attribute Name | Description |
|---|---|
| Label | Enter the text that displays in the user interface for the custom button or link. |
| Name | Accept or enter the unique name to use for the button or link when it’s referenced from a merge field. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. |
| Namespace Prefix | Enter the prefix that uniquely identifies your package. In a packaging context, a namespace prefix is a one to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers on AppExchange. Namespace prefixes are case-insensitive. For example, ABC and abc aren’t recognized as unique. Your namespace prefix must be globally unique across all Salesforce organizations. It keeps your managed package under your control exclusively. |
| Protected Component | Optionally limit use in a subscriber org. Protected components can’t be linked to or referenced by components created in a subscriber org. A developer can delete a protected component in a future release without worrying about failing installations. However, after a component is marked as unprotected and is released globally, the developer can’t delete it. |
| Description | Enter text that distinguishes the button or link from others. This text displays only to administrators when setting up buttons and links. |
| Display Type | Determine where the button or link appears on page layouts.
|
| Behavior | Choose the outcome of clicking the button or link. When applicable, some settings have default values. For example, if you choose Display in new window, the default height of a new window is 600 pixels. See Edit Window Open Properties. Some custom button and link behavior can’t be changed.
|
| Content Source | Choose whether to use a URL, s-control, JavaScript action, or Visualforce page as the content of the button or link. Salesforce checks the correctness of URLs in custom links and custom buttons. When you create or edit custom links or buttons that contain invalid URL markup, such as scripts, Salesforce blocks the links from rendering. Instead, an error message is shown on hover. Reconfigure the URLs to be valid and well formed. The URL can be a relative URL or an absolute http://, https://, file://, ftp://, or mailto:// address. Invalid URLs in custom links or custom buttons created before Spring ’13 aren’t checked for correctness until you edit them. |
| Content | Enter the content of the button or link for buttons and links of type URL or OnClick JavaScript.
Internet standards require special encoding for URLs. Salesforce encodes the text from any merge field you insert into a link. Encode extra text in your link manually. For example, to generate this URL: Use this content: Salesforce strips double quotes from URLs when the content source is a URL. If you must use double quotes, encode them manually. For example, to generate the URL http://www.google.com/search?q="salesforce+foundation", use this content: http://www.google.com/search?q=%22salesforce+foundation%22 |
| Link Encoding | Choose the encoding setting. Encoding defaults to Unicode (UTF-8). Change the default encoding setting if the target of a link requires data in a different format. Encoding is available if your Content Source is URL. |

