Export (0) Print
Expand All

Composing URLs

Microsoft Dynamics Nav 2009

You can use uniform resource locators (URL) to open elements in the Classic client. URLs have the following syntax:

navision://client/run?name1=value1&name2=value2...&name n &value n

The syntax of each argument is <name>=<value>. Arguments are separated by the "&" character. A name is case insensitive and may contain any alphanumeric character. A value is a case sensitive string that can contain any character. You can provide any number of arguments in any order. Unknown arguments are ignored.

Valid name characters: [A..z] and [0..9]

Valid value characters: all

If a value contains the "&" character, then you must use another "&" character as an escape character to indicate that & is part of the value. For example, if the company name is City Power & Light, then the following URL opens this company and runs the Customer List form:

navision://client/run?company=City Power && Light&target=form Customer List

The following table shows URL arguments.

Argument name Argument value Applies to Description

servername

Server name

Forms and reports

Indicates which database server to which the Classic client or Microsoft Dynamics NAV Server connects.

NoteNote
Use either "servername" or "database" as the argument.

database

File name

Forms and reports

Indicates which database file to access.

NoteNote
Use either "server" or "database" as the argument.

company

Company name

Forms and reports

Indicates which company to open.

target

Object

Forms and reports

Indicates which object to run. Valid argument values are the following:

  • form xxx

  • formxxx

  • Form xxx

  • Formxxx

  • report xxx

  • reportxxx

  • Report xxx

  • Reportxxx

Where xxx is either the object number or object name.

view

View description

Forms and reports

Indicates which filter to set. The format is the same as for the SourceTableView Property on a form.

position

Record description

Forms

Indicates which record to select. The format is the same as for the SourceTablePlacement Property on a form.

servertype

MSSQL or NAVISION

Forms and reports

Indicates which server to connect to.

requestform

Yes or no

Reports

Indicates whether a report should display its request form. The default value is no.

forcenewinstance

Yes or no

Forms and reports

Indicates whether a new instance of the Classic client should be started regardless of whether a suitable instance is running. The default value is no.

If you choose a running client as the target for the URL, the values are ignored for the server, the database, and the company because they have been used to select the particular running client.

If you choose a new client as the target for the URL, the default values are stored for the server, the database, and the company in the .zup file.

You must only use URLs without a specified server, database, or company when you link to program functionality, such as the customer card, and not when you link to data in the program, such as a view of a customer on a customer card.

The following strings are examples of internal URLs. C/AL code cannot handle external URLs because of undefined escape characters. The only defined escape character is the "&&" character.

navision://client/run?servertype=NAVISION&database=c:\database.fdb&company=dot.com&target=Form991&forcenewinstance=yes
// The following example contains a URL with field names:
navision://client/run?servername=navi_srv1&company=CRONUS International Ltd.&target=Form Account Schedule&view=SORTING(Schedule Name,Line No.)&position=Schedule Name=CONST(),Line No.=CONST(0)&servertype=MSSQL
// The following example contains a URL with field numbers:
navision://client/run?servername=navi_srv1&company=CRONUS International Ltd.&target=Form 104&view=SORTING(Field1,Field2)&position=Field1=0(),Field2=0(0)&servertype=MSSQL

Community Additions

ADD
Show:
© 2014 Microsoft