Compartir a través de


Creating and Running Hyperlinks

Hyperlinks enable users to send or save quick links to specific pages in Microsoft Dynamics NAV. For example, you can create a hyperlink to a specific list page, such as Customers. You can also use hyperlinks to specify parameters, such as server name, server service, or company. You can enter hyperlinks in the Command Prompt tool, in a browser window, or directly in the Run window.

You can use hyperlinks at a command prompt (as arguments to the command to start the Microsoft Dynamics NAV Windows client) or as URLs. At the command prompt, type the Microsoft Dynamics NAV name of the Microsoft Dynamics NAV Windows client executable and then, in quotation marks, the hyperlink. For example:

Microsoft.Dynamics.Nav.Client.exe "DynamicsNAV://MyServer/DynamicsNAV70/CRONUS International Ltd./RunPage?Page=22"

This example specifies a server name, service, company, and page ID. If entered correctly it opens the Microsoft Dynamics NAV Windows client on page 22, the customer list page.

An equivalent URL that you could type in a browser’s address bar is:

DynamicsNAV://MyServer/DynamicsNAV70/CRONUS%20International%20Ltd./RunPage?Page=22

Notice that in the case of a URL you must use encoding for special characters.

Building a URL

When you build a hyperlink URL, you can specify a page, a report, a query, an XMLport, a codeunit, a table, or a node:

  • DynamicsNAV://server/instance/company/runpage?page=22&bookmark=0ABA0700235752C7D1

  • DynamicsNAV://server/instance/company/runreport?report=901

  • DynamicsNAV://server/instance/company/runquery?query=5402

  • DynamicsNAV://server/instance/company/runxmlport?xmlport=5050

  • DynamicsNAV://server/instance/company/runcodeunit?codeunit=5845

  • DynamicsNAV://server/instance/company/navigate?node=Home/Items

  • DynamicsNAV://server/instance/company/RunTable?Table=18

The first three parameters to a Microsoft Dynamics NAV client URL are reserved for server, service, and company. You can omit certain parameters, in which case default values are assumed, but you must leave the correct number of forward slashes to indicate which parameters you have omitted. If you omit just one of these parameters, then it must be company. If you omit two parameters, then they must be company and instance. You can also omit all three parameters. For example, the following URL assumes the default instance and company on the MyServer server:

DynamicsNAV://MyServer///RunPage?Page=22

You can also specify a server port:

DynamicsNAV://MyServer:1234///RunPage?Page=22

This URL omits server, service, and company:

DynamicsNAV://///navigate?node=Home/Items

Specifying Additional Parameters

You can also specify the following additional parameters in a URL.

Parameter Description Example

Personalization ID

Specifies the unique identification used in personalization to store settings in the User Metadata table. If a personalization ID is not found, the page is launched without personalization.

DynamicsNAV://localhost/DynamicsNAV70/CRONUS%20International%20Ltd./runpage?page=22&personalization=0000232e-0000-001a-0008-0000836bd2d2

Bookmark

Positions the cursor on a single record in a table.

Only automatically generated bookmarks should be used. If you enter an incorrect bookmark, you will get an error message.

DynamicsNAV://localhost/DynamicsNAV70/CRONUS%20International%20Ltd./runpage?page=22&bookmark=120000000089083237343

Mode

Enables you to open a page in a specific mode.

Other modes include: view, edit, create, select, and delete.

DynamicsNAV://localhost/DynamicsNAV70/CRONUS%20International%20Ltd./runpage?page=22&mode=View

The following table shows some examples of hyperlinks and provides information about how to specify parameters.

Parameters Description Syntax Example

Company name

Enables you to switch a company (case sensitive).

DynamicsNAV:////<CompanyName>/RunPage?Page=<pageid>

DynamicsNAV:////CRONUS%20International%20Ltd./RunPage?Page=22

Navigate

Enables users to send or save quick links to specific pages.

DynamicsNAV://///navigate?node=<service>

DynamicsNAV://///navigate?node=Home/Items

RunPage

Enables you to run a specific page.

DynamicsNAV:////runpage?page=<page id>

DynamicsNAV:////runpage?page=42

RunReport

Enables you to run a specific report.

DynamicsNAV:////runreport?report=<report id>

DynamicsNAV:////runreport?report=50000

RunQuery

Enables you to run the About This Query page for a specific query.

DynamicsNAV:////runquery?query=<query id>

DynamicsNAV:////runquery?query=50000

RunXMLport

Enables you to run a specific XMLport.

DynamicsNAV:////runxmlport?xmlport=<xmlport id>

DynamicsNAV:////runxmlport?xmlport=99008500

RunCodeunit

Enables you to run a specific codeunit.

DynamicsNAV:////runcodeunit?codeunit=<codeunit id>

DynamicsNAV:////runcodeunit?codeunit=50000

RunTable

Enables you to run a specific table.

DynamicsNAV:////runtable?table=<table id>

DynamicsNAV:////runtable?table=18

Server name

Enables you to switch servers.

DynamicsNAV://<ServerName>///RunPage?Page=<pageid>

Microsoft.Dynamics.Nav.Client.exe DynamicsNAV://MyServer///RunPage?Page=22

Server port

Enables you to specify an optional server port number in the range 1-65535. The default port is 7046.

DynamicsNAV://<ServerName><:Port>///RunPage?Page=<pageid>

DynamicsNAV://MyServer:1234///RunPage?Page=22

Service instance

Enables you to specify a Service instance. You can find this value in the CustomSettings.config file. If you specify an instance you must also specify a server.

DynamicsNAV://<ServerName>/<ServiceInstance>//RunPage?Page=<pageid>

Microsoft.Dynamics.Nav.Client.exe DynamicsNAV://MyServer/DynamicsNAV70//RunPage?Page=22

Specifying Encoding in Company Names

When you enter a company name on the command line, enclose it quotation marks to ensure that spaces and other special characters are interpreted correctly. For URLs, use percent encoding to escape any characters above 127 in the ASCII character set.

You can run hyperlinks in the following ways.

Warning

Some page links are longer than 255 characters, which is the maximum length for the Windows Run menu. A link longer than 255 characters cannot be run from the Run menu.

Method To run a hyperlink

Run window

Choose Start, and then choose Run. Enter the hyperlink in the Run window, and then choose the OK button.

Command prompt window

At the command prompt, type the hyperlink directly.

Shortcut

Create a shortcut for the Microsoft Dynamics NAV executable on your Desktop.

On the shortcut menu, choose Properties, and then enter the hyperlink URL into the Target field of the shortcut. Choose the OK button, and then start Microsoft Dynamics NAV.

Browser window

Use a browser such as Internet Explorer and type the hyperlink URL directly into the address bar. To type hyperlinks into a browser, you must have Microsoft Dynamics NAV installed on your computer.

Web Reference for a web service

For more information, see SOAP Web Services and OData Web Services.

See Also

Tasks

How to: Run Reports

Concepts

Starting the Windows Client at the Command Prompt