---
schema_version: "1"
id: 41b57be21deb147839d57214ded470be97ae98b3ed33ac0979f0556ad0b543a2
title: HYPERLINK
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_hyperlink.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_hyperlink.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a87d306d0d133f0a23f9b6e21785f54a7b9ccf4953da1011dd7f42643382f8ee
description: Creates a link to a URL specified that is linkable from the text specified.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# HYPERLINK

Creates a link to a URL specified that is linkable from the text specified.

## Use

`HYPERLINK(url, friendly_name [,target])` and replace url with the Web address, replace friendly\_name with the link text, and, optionally, replace target with the window or frame in which to display the content.

## Tips

- Hyperlink formula fields are of type text.
- Include the protocol and URL in quotes as in `HYPERLINK("http://www.cnet.com", "cnet")`.
- Avoid using text functions such as LEN, LEFT, or RIGHT on HYPERLINK function results.
- The URL can’t contain JavaScript. This increases security for your org. Using JavaScript is permitted in packages, sandbox copies, and change sets.
- Use a relative link to link to Salesforce pages. If your full link is https://yourInstance.salesforce.com/00U/e, then its relative link is /00U/e. Relative links allow the hyperlink to work correctly on all Salesforce pages. Use the relative URL in a hyperlink formula to add it to a search layout. Make sure to prepend your relative URL with a forward slash “`/`”.
- Use the $Api variable to reference API URLs.
- Be sure to remove the brackets, \[ and \], from your formula before validating it.
- The target parameter is optional. If you don't specify a target, the link opens in a new browser window. Some common target parameters are:
    - \_blank—Displays link in a new unnamed window.
    - \_self—Displays link in the same frame or window as the element that refers to it.
    - \_parent—Displays link in the immediate frameset parent of the current frame. This value is the same as \_self if the current frame has no parent.
    - \_top—Displays link in the full original window, canceling any other frames. This value is the same as \_self if the current frame has no parent.For more information on basic HTML tags, consult an HTML reference on the Internet.
- In Chatter feed links created with a hyperlink formula, the target parameter doesn't render and defaults to \_blank.
- **Consideration in Lightning Experience:** In a Lightning console app, hyperlinks that you paste or insert in the Chatter rich text editor can open differently than links that appear in a feed item because a `HYPERLINK()` formula produced the link Pasted links can follow console navigation (such as opening in a console subtab), while links from `HYPERLINK()` in the feed are intended to open in a new browser tab or window. For more about how formula hyperlinks open in Lightning Experience and the console, see [Tips for Working with Hyperlink Formula Fields](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_hyperlink_formula_fields.htm&release=264.0.0&type=5 "Get tips on using formula fields that contain a HYPERLINK function. Learn how to control link target behavior and predict how relative and external links open. Plus, find guidance on supported URL protocols in Lightning Experience.").
- The HYPERLINK function is available everywhere that you can define a formula except default values, field updates, s-controls, validation rules, approval processes, custom buttons and links, and workflow rules.

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

Create Events Example

```
HYPERLINK("/00U/e?
retURL=%2F006x0000001T8Om&what_id="
& Id, 
"Create Event")
```

adds a link called Create Event that, when clicked, creates an event that is associated with the current object.

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

Phone Dialer Example

`HYPERLINK("http://servername/call?id=" & Id & "&phone=" & Phone, Phone)` creates a linkable phone number field that automatically dials the phone number when clicked. In this example, replace `"servername"` and `"call"` with the name of your dialing tool and the command it uses to dial. The merge field, Id, inserts the identifier for the contact, lead, or account record. The first Phone merge field tells the dialing tool what number to call and the last Phone merge field uses the value of the Phone field as the linkable text the user clicks to dial.