Udostępnij za pośrednictwem


Opening a Page in the Microsoft Dynamics NAV Web Client by Using a URL

You can open a specific page in the Microsoft Dynamics NAV Web client by typing the page's URL in the address of a web browser. You can use the URL as a hyperlink to the page, which you can include in other sources, such as emails or Word documents, or you can it send to other users.

Important

Certain data in the URL, such as company name, could be considered sensitive information. Use discretion if you distribute URLs that contain the company name, or if it is possible, exclude this information from the address.

Example

The following URL displays page 9305 Sales Order List for the CRONUS International Ltd. company. The page is displayed in a Microsoft Dynamics NAV Web client that is running on port 8080 of a computer that has the name MyWebServer.

https://MyWebServer:8080/nav_server_instance/WebClient/default.aspx?company=CRONUS%20International%20Ltd.&page=9305  

There are several parameters that define the address for the page. These parameters are described in the URL Parameters section of this topic. You can also filter the data on specific fields of the page. For information about how to filter the data, see Filtering Data on the Page.

Page Address Syntax

The address to open a page in the Microsoft Dynamics NAV Web client has the following syntax.

<http|https>://<webserver>[:<port>]/<webserverinstance>/?<page>=<ID>&[tenant=<tenantID>]&[company=<companyname>]&[mode=<View|Edit|Create>]&[profile=<profileID>]&[bookmark=<bookmark>]&[captionhelpdisabled=<0|1>]&[showribbon=<0|1>]&[shownavigation=<0|1>]&[showuiparts=<0|1>]&[redirect<0|1>]&[extension=<extensionID>]

Or for Microsoft Dynamics NAV 2017 and earlier versions:

<http|https>://<webserver>[:<port>]/<webserverinstance>/WebClient/<default|blank>.aspx?<page>=<ID>&[tenant=<tenantID>]&[company=<companyname>]&[mode=<View|Edit|Create>]&[profile=<profileID>]&[bookmark=<bookmark>]&[captionhelpdisabled=<0|1>]&[showribbon=<0|1>]&[shownavigation=<0|1>]&[showuiparts=<0|1>]&[redirect<0|1>]

The URL consists of two parts, the web server part and the Dynamics NAV content part. The web server part targets a specific site on the computer that is running Microsoft Dynamics NAV Web Server components and includes the following syntax.

<http|https>://<webserver>[:<port>]/<webserverinstance>

Or for Microsoft Dynamics NAV 2017 and earlier versions:

<http|https>://<webserver>[:<port>]/<webserverinstance>/WebClient

The Dynamics NAV content part includes the rest of the address after WebClient. This part of the address is composed of an active server page extended (ASPX) file and a query string that specifies the page to display.

Syntax Key

The following table describes the notation that is used to indicate address syntax.

Notation Description
Text without brackets Parameters that you must type as shown.
<> A placeholder for values that you must supply. Do not include the brackets in the address.
[] Optional parameters. Do not include the brackets in the address.
| A set of values from which to choose. Use one of the options and do not include | in the address.

Building the Page Address

Use the following guidelines to write page URL syntax and create a URL:

  • Place parameters in any order after aspx? because the order is not important. For example, the following URLs will yield the same results.

    https://MyWebServer:8080/nav_server_instance/?company=CRONUS%20International%20Ltd.&page=9305&mode=View
    
    https://MyWebServer:8080/nav_server_instance/?page=9305&mode=View&company=CRONUS%20International%20Ltd.
    
  • Separate parameters after aspx? with the ampersand symbol (&).

  • Use %20 for any spaces in values and names.

  • Enclose values in single quotation marks ('').

URL Parameters

The following table describes the parameters of the URL for displaying a page.

Parameter Description
http|https Specifies the Internet protocol to use. Valid options are http and https.

The https protocol helps secure the Dynamics NAV data that is transmitted over the Internet. To use https, Secure Sockets Layer (SSL) must be enabled on the connection to Microsoft Dynamics NAV Web client. For more information, see How to: Configure SSL to Secure the Connection to Microsoft Dynamics NAV Web Client.
webserver Specifies the name of the computer that is running Microsoft Dynamics NAV Web client.
port Specifies the server port on which the Microsoft Dynamics NAV Web client is running. The default port is 8080.
webserverinstance Specifies the name of the web server instance for the Microsoft Dynamics NAV Web client. On IIS, this is the alias of the virtual directory of the web server instance.

When you install the Microsoft Dynamics NAV Web client using Dynamics NAV Setup, the web server instance is given the same name as the Microsoft Dynamics NAV Server instance that it connects to. If you use the New-NAVWebServerInstance cmdlet to add Microsoft Dynamics NAV Web client instances, then you specify the web server instance name. For more information, see How to: Set Up Multiple Web Server Instances for the Microsoft Dynamics NAV Web Client.
default|blank Specifies the name of the active server page file to use to display the page. You can use either of the following types, regardless what the page type is: default or, blank.

The type that you set is not important because the Microsoft Dynamics NAV Web client will automatically redirect to the appropriate page. Important: You cannot use blank to open a RoleCenter type page. Use default instead.
company The name of the company in Dynamics NAV for which you want to display the page.

If you do not choose a company, then Microsoft Dynamics NAV Web client uses the company that is defined in its configuration file. If no company is defined in the configuration file, then the company last opened by the user is used.
page The ID of the page in Dynamics NAV.
mode Specifies the mode in which to display the page.

- View
The page can only be viewed. The user cannot change data on the page. Note: Worksheet page types only display in the edit mode, even if the value is set to View.

- Edit
The user can change data on the page. Note: To use the edit mode, the Editable Property of the page in Page Designer must be set to Yes. This mode is not supported for pages of the type List, RoleCenter, and CardPart. If you set the value to Edit, pages of these types still display in the view mode. For List type pages, the user can modify the list by choosing Edit List in the ribbon of the page in Microsoft Dynamics NAV Web client.

- Create
Opens a blank page that enables the user to create a new item.

Note: The Createmode is not supported for pages of the type CardPart, List, ListPart, RoleCenter, and Worksheet. For pages of the type CardPart, List, and ListPart, the page displays in the view mode. Do not use this mode for Worksheet pages; otherwise you will get an error when you try to open the page.
tenant Specifies the ID of the tenant to connect to. You must provide this parameter when Dynamics NAV is deployed in multitenant architecture. The tenant that you specify must be mounted on the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV Web client connects to. For more information, see Multitenant Deployment Architecture.
profile Specifies the ID of the profile to open in Dynamics NAV. For more information, see How to: Open the Microsoft Dynamics NAV Web Client.
bookmark Specifies a record in the underlying table of the page. The value of a bookmark is an alphanumeric string of characters, for example, 27%3bEgAAAAJ7CDAAMQA5ADAANQA4ADkAMw%3d%3.

For the page types Card, CardPart, and Document, the bookmark specifies the record that is shown in the page. For page types List, ListPart, and Worksheet, the bookmark specifies the record that is selected in the list on the page.

Important: Bookmarks are generated automatically. You can only determine a value for the bookmark by displaying the page in the Microsoft Dynamics NAV Web client and looking at its address. Therefore, a bookmark is only relevant when the address you are working with has been copied from another instance of the page in the Microsoft Dynamics NAV Web client.
captionhelpdisabled Specifies that the ability to look up Help by selecting a field caption is disabled.

If you want the Help look up from the field captions, either omit this parameter or set its value to 0, such as captionhelpdisabled=0.

If you do not want the Help lookup from field captions, set the value to 1, such as captionhelpdisabled=1.

Note: The parameter needs to be added at the first request when the user logs on to take effect, adding the parameter on an existing session has no effect.
showribbon Specifies whether to show the ribbon on the specified page when it opens.

If you want the ribbon, either omit this parameter or set its value to 1, such as showribbon=1.

If you do not want the ribbon, set the value to 0, such as showribbon=0.

Note: This parameter only works for pages of the list page type.
shownavigation Specifies whether to show the navigation pane when the specified page opens.

If you want the navigation pane, either omit this parameter or set its value to 1, such as shownavigation=1.

If you do not want the navigation pane, set the value to 0, such as shownavigation=0.

Note: This parameter only works for pages of the list page type.
showuiparts Specifies whether to show UI parts when the specified page opens. The default value, if the parameter is not specified, is 1 which displays the UI parts. Use the value 0 to not show UI parts.

If you want the UI parts, either omit this parameter or set its value to 1, such as showuiparts=1.

If you do not want the UI parts, set the value to 0, such as showuiparts=0.

Note: This parameter only works for pages of the list page type.
redirect Specifies whether users are presented with an option to download the Microsoft Dynamics NAV Universal App when they open the Microsoft Dynamics NAV Web client in a browser in order to improve the user experience.

If you want to give users this option, either omit this parameter or set its value to 1, such as redirect=1.

If you do not want to give users this option, set the value to 0, such as redirect=0.

extension Specifies the unique identifier (ID) of an extension that is deployed on the tenant. This parameter is mainly used during the development of the specified extension in a non-production environment. When this parameter is set, only the specifed extension is available in the client; all other extensions are ignored and not visible. This enables you to isolate and focus on the behavior of the specified extension only.

An extension ID is a 32-digit GUID, such as 72CC5E27-BD97-4271-AF55-F77E4471E493. You set this parameter using the format extension={GUID}, for example:

&extension={72CC5E27-BD97-4271-AF55-F77E4471E493}

You can determine an extension ID by opening the extension in Visual Studio Code and looking in the app.json file, or by running the Get-NAVAppManifest cmdlet on the extension package.

For more information about framing the Web client, see Embedding Microsoft Dynamics NAV Web Client Pages in Other Websites.

Filtering Data on the Page

You can filter the data that is displayed in the page by using the filter parameter in the address. The filter parameter enables you to display only records from the underlying table of the page that have specific values for one or more fields.

Example

The following address displays data in page 9305 only for the customer who has the Sell-to Customer No. 10000 and the Location Code Blue.

https://MyWebServer:8080/nav_server_instance/?company=CRONUS%20International%20Ltd.&page=9305&filter='Sell-to Customer No.' IS '10000' AND 'Location Code' IS 'BLUE'  

Or for Microsoft Dynamics NAV 2017 and earlier versions:

https://MyWebServer:8080/nav_server_instance/WebClient/default.aspx?company=CRONUS%20International%20Ltd.&page=9305&filter='Sell-to Customer No.' IS '10000' AND 'Location Code' IS 'BLUE'  

Filter Syntax

The filter has the following syntax.

&filter='<field>'-IS-'<value>'[-AND-'<field>'-IS-'<value>']  

You must include a space or %20 before and after the ISand AND operators. You can add the filter anywhere in the address after .aspx?.

Tip

The filter syntax for a page in the Microsoft Dynamics NAV Web client is the same as a page in the Microsoft Dynamics NAV Windows client, which you can see by choosing the Copy Link to Page action on the Application menu in the Microsoft Dynamics NAV Windows client.

Filter Parameters

The following table describes the filter parameters.

Parameter Description
field The name of the table field on which to filter.
IS Specifies the equal operator.
value The value of the table field on which to filter.
AND Use this parameter to specify more than one filter. It specifies an “and” operator for adding additional filters. Place AND between each additional filter.

To be included in the page data, the table record must match values for all fields in the filter.

See Also

Deploying the Microsoft Dynamics NAV Web Server Components
How to: Install the Web Server Components
Developing for the Microsoft Dynamics NAV Web Client
How to: Open the Microsoft Dynamics NAV Web Client