The HYPERLINK parameter turns a Salesforce URL field into a clickable link in the generated document. You can also set display text to show instead of the raw URL.

Syntax

{{HYPERLINK:FieldName:DisplayText}}

Values

ComponentEffect
FieldNameThe Salesforce field that holds the URL, for example Account.Website. The field must contain an absolute (fully qualified) URL.
DisplayTextOptional. The link text to show in the document instead of the raw URL.

Where to add it

Type the HYPERLINK merge field in your Word template where you want the link to appear.

Example

Field valueSyntaxOutput
The account's full website URL{{HYPERLINK:Account.Website:Contact Us}}Contact Us, a clickable link to the website URL

Works in

The link works in DOCX and PDF output (Which parameter creates a link in DOCX or PDF format?).

Common errors

  • The link doesn't open the right page. The field must hold an absolute URL, including https://, not a relative address such as www.example.com/page. Check the value on the record.
  • The link text is blank. The URL field is empty on the record. See Merge fields are blank or show their tags.
  • An error names the field. The field name is wrong or you can't see the field. See DME-SF-002.