HYPERLINK Function

Passes a URL as an argument to an Internet browser, such as Windows Internet Explorer.

HYPERLINK(URL)

Parameters

  • URL
    Type: Text A URL that is passed to the Internet browser as an argument.

Remarks

The syntax must be a valid URL, such as https://www.microsoft.com, or file path, such as c:\temp\myfile.txt. If you want the URL to be configurable, you can get the URL from a field or a variable instead. If you pass an empty string, then no browser window is opened.

If you use this function for an application that runs on the Microsoft Dynamics NAV Windows client, then the default Internet browser that is based on the setting in the system registry is used. If the browser is already running, then a new tab opens in the browser window. If you use this function for an application that runs on the Microsoft Dynamics NAV Web client, then a new tab in the same browser window that is currently hosting the Microsoft Dynamics NAV Web client is opened.

The HYPERLINK function works with different protocols and file types as along as the syntax is valid.

The HYPERLINK function does not work on NAS services.

Example

The following example shows two uses of the HYPERLINK function to open the specified URL in the default browser. In the first line of code, the URL is specified in code. The second line of code illustrates how you can get a URL that is stored in a field on the current table.

HYPERLINK('https://www.microsoft.com'); 
...
HYPERLINK(Rec.UrlField);

See Also

Other Resources

APPLICATIONPATH Function
GUIALLOWED Function
SLEEP Function
TEMPORARYPATH Function