---
schema_version: "1"
id: 2275c436c73af797f2d979201356de8ebf89c343cd90ca65e05bd6d217eaae2c
title: "Custom Link Example: Link to Reports"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/custom_links_example_linking_to_reports.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.custom_links_example_linking_to_reports.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 96be3bd52ea2b1db02f1ee10a7d53c5604f68d38cbd6548e84a98ec4b05d21a7
description: Use custom links to run reports with filtered results from a Salesforce record detail page. For example, let’s say you frequently run a mailing list report for the contacts related to an account. You can create a custom link for accounts that links directly to a report that is automatically filtered to the account that you’re viewing. In this case, your custom link must pass the account’s unique record ID to the report.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Custom Link Example: Link to Reports

Use custom links to run reports with filtered results from a Salesforce record detail page. For example, let’s say you frequently run a mailing list report for the contacts related to an account. You can create a custom link for accounts that links directly to a report that is automatically filtered to the account that you’re viewing. In this case, your custom link must pass the account’s unique record ID to the report.

### 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="d162578e87">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d162578e87 ">To create or change custom buttons or links:</td>

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

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

1. Copy the ID for the type of record by which you want to filter your report. This example uses an account record. To do so, view the record and copy the 15-character ID from the last part of the URL. For example, from https://MyDomainName.my.salesforce.com/001200030012j3J, copy **001200030012j3J**.
2. From the Reports tab, create the report you want by either customizing a standard report or creating a custom report.
3. Filter the report by the record ID you copied. For example, Account ID equals 001200030012j3J.
4. Run the report and verify that it contains the data you expect.
5. Click **Customize**.
6. To save the report to a public folder where it’s accessible by the appropriate users, click **Save** or **Save As**. **Save** doesn’t create a custom report, whereas **Save As** does.
7. Run the report and copy the report’s URL from the browser.
8. Begin creating your custom link. Set the Content Source field to URL. In the large formula text area, paste the report URL that you copied. Remember to omit the domain portion https://MyDomainName.my.salesforce.com.
9. Add the custom link to the appropriate page layouts.
10. Verify that the new custom link works correctly.

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

Tip When creating a report for use in a custom link, set date ranges and report options generically so that report results include data that can be useful for multiple users. For example, if you set a date range using a record’s Created Date, set the Start Date far enough in the past to not exclude any relevant records and leave the End Date blank. If you scope the report to just My records, the report doesn’t always include all records that a user can see. Try setting the report options to All visible records.

#### See Also

- [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.")
- [Custom Link Example: Link to Documents](https://help.salesforce.com/s/articleView?id=platform.custom_links_example_linking_to_documents.htm&release=264.0.0&type=5 "Use custom links to reference documents from a Salesforce record detail page.")
- [Custom Link Example: Link to Files in Chatter](https://help.salesforce.com/s/articleView?id=platform.custom_links_example_linking_to_files.htm&release=264.0.0&type=5 "Use custom links to reference files from Chatter.")