You can display a Microsoft Dynamics NAV page on a SharePoint site by using a Uniform Resource Locator (URL). To display the page, you can type the URL directly in the address of a web browser or use it to create links from other SharePoint pages. The URL consists of several parameters in a specific syntax that specifies which page to display and the SharePoint site in which to display it.

When you use a URL to open a page, it opens in a SharePoint application page. For more information about SharePoint application pages, see Displaying Pages in the Microsoft Dynamics NAV SharePoint Client.

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

The topic includes the following sections:

Example

The following URL displays page 9305 Sales Order List for the CRONUS International Ltd. company. The page is displayed in the SharePoint site that is running on port 6834 of the SharePoint server.

  Copy Code
http://MySharePointServer:6834/_layouts/Dynamics/Framework/List.aspx?company=CRONUS%20International%20Ltd.&page=9305
Note
List type pages open embedded in a SharePoint site page. All other page types open in a modal popup in the SharePoint application.

For information about how to filter data on the page, see Filtering Data on the Page.

URL Syntax

The URL to display a page in a SharePoint site has the following syntax.

  Copy Code
<http|https>://<sharepointserver>[:<port>][/<site>]/_layouts/Dynamics/Framework/<card|list|blank>.aspx?page=<ID>&[company=<companyname>]&[mode=<View|Edit|Create>]

The URL consists of two parts: the SharePoint server part and the Microsoft Dynamics NAV content part. The SharePoint server part is the first section of the URL and includes the following.

  Copy Code
<http|https>://<sharepointserver>[:<port>][/<site>]

The SharePoint server part targets a specific site instance on the SharePoint Foundation server that is running Microsoft Dynamics NAV Portal Framework. The Microsoft Dynamics NAV content part includes the rest of the URL after _layouts/Dynamics/Framework/. This piece of the URL 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 URL 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 URL

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

  • Place parameters in any order because the order of parameters after .aspx? is not important. For example, List.aspx?company=CRONUS%20International%20Ltd.&page=9305&mode=View yields the same as List.aspx? page=9305&mode=View company=CRONUS%20International%20Ltd..
  • Separate parameters after <pagetype>.aspx? with &.
  • Use %20 for any spaces in values and names.
  • Enclose values in 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 Microsoft 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 Portal Framework. For more information, see Securing the Connection to Microsoft Dynamics NAV Portal Framework With SSL.

sharepointserver

Specifies the name of the computer that is running SharePoint server and the Microsoft Dynamics NAV Portal Framework.

port

Specifies the server port on which the SharePoint application or site is running. If you do not provide a port number, then the page displays in the default SharePoint application, which is typically set up on port 80.

site

Specifies the URL path and name of the SharePoint site in which to display the page. If you do not specify a site, then the root or top-level site is served.

A SharePoint web application consists of collection of one or more sites. For example, a web application company might have different sites for each department. Each site has its own path and name on the port it is run and sites will typically be arranged in hierarchical structure.

_layouts/Dynamics/Framework

Specifies the relative path to the active server pages (.aspx files) of Microsoft Dynamics NAV Portal Framework that are used for displaying pages. Do not change this value.

By default, the aspx files are located on the SharePoint server in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\Dynamics\Framework folder.

Card|List|Blank

Specifies the name of the active server page file to use to display the page based on the page type in Microsoft Dynamics NAV. You can use any of the following types, regardless of what the page type is: Card, List, Report, Blank.

The type that you set is not important because the Microsoft Dynamics NAV Portal Framework will automatically redirect to the appropriate page, regardless of the type that you use. For example, if you use Card.aspx to display a List type page, then URL is automatically redirected to the List.aspx.

Important
You cannot use Blank to open a RoleCenter type page. Use List or Card instead.

company

The name of the company in Microsoft Dynamics NAV for which you want to display the page.

If you do not choose a company, then Microsoft Dynamics NAV Portal Framework uses the company that is defined in the web.config file for the SharePoint application. If no company is defined in the web.config file, then the last company used by user is displayed.

ID

The ID of the page in Microsoft Dynamics NAV.

Important
Microsoft Dynamics NAV Portal Framework does not support the page type NavigatePage. If you try to display a NavigatePage type page on a SharePoint site, then you will get an error that states that the page cannot be built.

bookmark

Specifies a specific 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 SharePoint site 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 SharePoint.

mode

Specifies the mode in which to display the page.

Mode Description Remarks

View

The page can only be viewed. The user cannot change data on the page.

Worksheet page types only display in the edit mode, regardless of the mode parameter setting.

Edit

The user can change data on the page.

Important
To use the Edit mode, the Editable Property of the page in Page Designer must be set to Yes.

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.

Note
For List type pages, the user can modify the list by choosing Edit List in the ribbon of the page in Microsoft Dynamics NAV SharePoint client.

Create

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

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.

Important
Do not use Create for Worksheet pages; otherwise you will get an error when you try to open the page.

Filtering Data on the Page

You can filter the data that is displayed in the page by using the filter parameter in the URL. 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. equal to 10000 and the Location Code equal to Blue.

  Copy Code
http://MySharePointServer:6834/_layouts/Dynamics/Framework/List.aspx?company=CRONUS%20International%20Ltd.&page=9305&filter='Sell-to%20Customer%20No.'%20IS%20'10000'%20AND%20'Location%20Code'%20IS%20'BLUE'

Filter Syntax

The filter has the following syntax.

  Copy Code
&filter='<field>'%20IS%20'<value>'[%20AND%20’<field>’%20IS%20'<value>']

You can add the filter anywhere in the address after .aspx?.

Tip
The filter syntax for a page in the Microsoft Dynamics NAV SharePoint client is in the Microsoft Dynamics NAV Windows client. In the Microsoft Dynamics NAV Windows client, you can see the URL by choosing the Copy Link to Page action on the Application menu.

Filter parameters

The following table describes the filter parameters.

Parameter Description

field

The name of the table field on which to filter.

%20IS%20

Specifies the equal operator.

value

The value of the table field on which to filter.

%20AND%20

Use this parameter to specify more than one filter. It specifies an “and” operator for adding additional filters. Place %20AND%20 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