---
schema_version: "1"
id: 73470ad73bc244829fca4ed498ac02396541149be5567aa9fb17614a8becf385
title: Define Custom Buttons and Links
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/defining_custom_links.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.defining_custom_links.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 97512a17c09c59055bad21c96ab6045822342da55a24c8c5669da3dd2d2bfe6e
description: Define the action that occurs when a user clicks a custom button or link. Custom buttons and links can streamline actions within Salesforce or integrate Salesforce data with external URLs, applications, or systems.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Define Custom Buttons and Links

Define the action that occurs when a user clicks a custom button or link. Custom buttons and links can streamline actions within Salesforce or integrate Salesforce data with external URLs, applications, or systems.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Custom buttons and links are available in: <strong>All</strong> Editions</p>
              <p style="margin-bottom:0;">Visualforce
                pages and s-controls are available in: <strong>Contact Manager</strong>, <strong>Group</strong>,
                <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>,
                and <strong>Developer</strong> Editions
              </p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="vertical-align:top;" id="d74656e87">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d74656e87 ">To create or change custom buttons or links:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d74656e87 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

 [![Play](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/play_btn.png) Watch a Demo (English only)](https://salesforce.vidyard.com/watch/ddtSO_rtC8Ew8-yIWz3ZLw)

If you want the button or link to launch a custom page or other code, consider a Visualforce page.

1. From the management settings for the object that you want to edit, go to Buttons, Links, and Actions.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note Custom buttons aren’t available on the User object or custom home pages. Custom buttons and links are available for activities under the individual object management settings for tasks and events. To override a standard button that applies to both tasks and events, go to the object management settings for activities.
2. Click **New Button or Link**. Or, to add a predefined custom link, click **Default Custom Links**.
3. For **Display Type**, select **Detail Page Link**, **Detail Page Button**, or **List Button**.
    
    If you select **List Button**, and your list button requires users to select individual records in a list, then select **Display Checkboxes (for Multi-Record Selection)**. When you select this option, a checkbox appears next to each list item to let users select records, and the list button action is applied to those records. Don’t select **Display Checkboxes (for Multi-Record Selection)** if your list button doesn’t require users to select individual records in the list. For example, your list button links to a URL that doesn’t support POST operations, such as a URL that links to a Lightning component.
    
    In Lightning Experience, when you select **Display Checkboxes (for Multi-Record Selection)**, the related list type must be set to **Enhanced List**. You can set the related list type from the Related List–Single component or Related Lists component on a record page in the Lightning App Builder.
4. Enter the [button or link attributes](https://help.salesforce.com/s/articleView?id=platform.defining_custom_links_fields.htm&release=264.0.0&type=5 "This table describes the fields that are available when you create a custom button or link.").
    
    Here’s an example of the attributes for a button that performs a web search for an account’s name.
    
    ![Button and link creation page](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/ui_nav_new_button.png)
5. To validate all Salesforce merge fields and functions, click **Check Syntax**.
6. Click **Save** when you’re finished, or click **Quick Save** to save and continue editing. If you set the content source to URL, saving validates the URL you defined.
7. To open a button or link using settings other than the user’s default browser settings, click **Window Open Properties** on the button or link’s detail page.
8. To view all references to the new button or link, click **Where is this used?** on its detail page.
    
    Custom links for users are automatically added to the Custom Links section of the user detail page. You can add page buttons only to the Button section of a page layout.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note A link URL can be up to 2,048 bytes. When data is substituted for the tokens in the URL, the link can exceed 3,000 bytes. Some browsers enforce limits on the maximum URL length.

Before you can use your custom buttons and links, add them to an object’s page layout. You can then see and use the button or link on a record detail page.

![Account record detail page with a custom button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/ui_nav_new_button_result.png)

- **[Custom Button and Link Fields](https://help.salesforce.com/s/articleView?id=platform.defining_custom_links_fields.htm&release=264.0.0&type=5)**  
    This table describes the fields that are available when you create a custom button or link.
- **[Construct Effective Custom URL Buttons and Links](https://help.salesforce.com/s/articleView?id=platform.custom_links_constructing.htm&release=264.0.0&type=5)**  
    Use these methods to construct effective custom URL buttons and links.
- **[Edit Window Open Properties](https://help.salesforce.com/s/articleView?id=platform.editing_window_open_properties.htm&release=264.0.0&type=5)**  
    Custom buttons and links can open in different types of windows. If you configure a custom button or link to open in a window, set the window properties. If you leave the window properties blank, the custom button or link uses the default settings of the user’s browser.
- **[Merge Fields for Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=platform.links_merge_fields.htm&release=264.0.0&type=5)**  
    A merge field is a field that incorporates values from an object record. You can put merge fields in an email template, mail merge template, custom link, or formula.
- **[Add Default Custom Links](https://help.salesforce.com/s/articleView?id=platform.adding_default_custom_links.htm&release=264.0.0&type=5)**  
    Update predefined custom links for account, contact, lead, campaign, and solution detail pages.
- **[Custom Link Best Practices](https://help.salesforce.com/s/articleView?id=platform.custom_links_best_practices.htm&release=264.0.0&type=5)**  
    Custom buttons and links can streamline actions within Salesforce, or integrate Salesforce data with external URLs, applications, or systems. Use these tips to get the most out of your custom links.

#### See Also

- [Find Object Management Settings](https://help.salesforce.com/s/articleView?id=platform.extend_click_find_objectmgmt_parent.htm&release=264.0.0&type=5 "Salesforce lets you personalize your object model with features like custom fields, page layouts, and validation rules. Depending on which experience of Salesforce you have enabled, these customizations are located in different areas of Setup.")
- [Custom Button and Link Considerations](https://help.salesforce.com/s/articleView?id=platform.links_considerations.htm&release=264.0.0&type=5 "Keep these considerations in mind when working with custom buttons and links.")
- [Custom Button and Link Limitations](https://help.salesforce.com/s/articleView?id=platform.custom_button_link_limitations.htm&release=264.0.0&type=5 "Keep these limitations in mind when working with custom buttons and links.")
- [Custom Button and Link Samples](https://help.salesforce.com/s/articleView?id=platform.links_useful_custom_buttons.htm&release=264.0.0&type=5 "Use samples of custom Salesforce buttons and links to determine whether they can work for you.")