---
schema_version: "1"
id: d260c38d02c01b213d36c01800e2d50f75e006dd664e0ca77687b3127fcbb9ec
title: Microsoft Dynamics NAV Connector 4.0
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/microsoft-dynamics-nav-connector/latest/index.md
canonical_url: https://docs.mulesoft.com/microsoft-dynamics-nav-connector/latest/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2fa197da8b145b9957ceee756583501a5c252d9fe4dd046a659928dd515992ec
description: MuleSoft Documentation Site
release: "4.0"
latest: true
---
---
product: Microsoft Dynamics NAV Connector
version: 4.0
is-latest-version: true
---

# Microsoft Dynamics NAV Connector 4.0

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for Microsoft Dynamics NAV (NAV Connector) enables Mule apps to interact with
Microsoft Dynamics NAV Web Services. Microsoft Dynamics NAV is a global enterprise resource planning
(ERP) solution to assist with finance, manufacturing, customer relationship management, supply
chains, analytics, and electronic commerce for small and medium-sized enterprise and local
subsidiaries of large international groups.

The versions of Microsoft Dynamics NAV supported by this connector are:

- 2013 R2

- 2015

- 2016

- 2017

Release Notes:
[Microsoft Dynamics NAV Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ms-dynamics-nav-connector-release-notes-mule-4)  
Exchange:
[Microsoft Dynamics NAV Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-microsoft-dynamics-nav-connector/)

## Before You Begin

To use this information, you should be familiar with Microsoft Dynamics NAV, Mule runtime engine
(Mule), Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global
Elements.

You need login credentials to test your connection to your target resource.

For hardware and software requirements and compatibility information, see the Connector Release
Notes.

To use this connector with Maven, view the pom.xml dependency information in the Dependency Snippets
in Anypoint Exchange.

## POM File Information

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-microsoft-dynamics-nav-connector</artifactId>
  <version>x.x.x</version>
  <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.x.x` with the version that corresponds to the connector you are using.

To obtain the most up-to-date `pom.xml` file information, access the connector in
[Anypoint Exchange](https://www.mulesoft.com/exchange/) and click **Dependency Snippets**.

## Primary Use Cases

The Microsoft Dynamics NAV Connector supports these operations:

<table><colgroup><col> <col></colgroup><thead><tr><th>Operation</th><th>Description</th></tr></thead><tbody><tr><td><p>Page Operation</p></td><td><p>Execute one of the operations defined in published Page SOAP services.</p></td></tr><tr><td><p>Codeunit Operation</p></td><td><p>Execute one of the operations defined in published Codeunit SOAP services.</p></td></tr><tr><td><p>OData Query</p></td><td><p>Execute a Query against one of the NAV entities using the OData endpoint.</p></td></tr></tbody></table>

## Getting Started

Before creating a sample flow, a published Page Service is necessary. See below.

## Connect in Anypoint Studio

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring
it as needed.

## Add the Connector to a Studio Project

Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange
button in the Studio taskbar or from the Mule Palette view.

### Add the Connector Using Exchange

1.  In Studio, create a Mule project.

2.  Click the Exchange icon **(X)** in the upper-left of the Studio task bar.

3.  In Exchange, click **Login** and supply your Anypoint Platform username and password.

4.  In Exchange, search for "nav".

5.  Select the connector and click **Add to project**.

6.  Follow the prompts to install the connector.

### Add the Connector in Studio

1.  In Studio, create a Mule project.

2.  In the Mule Palette view, click **(X) Search in Exchange**.

3.  In **Add Modules to Project**, type "nav" in the search field.

4.  Click this connector’s name in **Available modules**.

5.  Click **Add**.

6.  Click **Finish**.

### Configure in Studio

1.  Drag an HTTP Listener to the Studio Canvas.

    ![Listener dragged to canvas](/mulesoft/current/en-us/microsoft-dynamics-nav-connector/latest/_images/ms-dynamics-nav-listener-anypoint.png)

    1.  Set the Path.

    2.  Click the green plus sign to configure the listener.

2.  Drag a Dynamics Nav operation to the Studio Canvas.

3.  Click the green plus sign to add a configuration for the connector.

4.  Complete these fields.

    <table><colgroup><col> <col></colgroup><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Domain</strong></p></td><td><p>Domain of the Dynamics NAV instance.</p></td></tr><tr><td><p><strong>Username</strong></p></td><td><p>The Windows username to connect to Dynamics NAV.</p></td></tr><tr><td><p><strong>Password</strong></p></td><td><p>The Windows password to connect to Dynamics NAV.</p></td></tr><tr><td><p><strong>Soap Url</strong></p></td><td><p>Base URL where the SOAP services are exposed in the form <code>https://&lt;Server&gt;:&lt;WebServicePort&gt;/&lt;ServerInstance&gt;/WS</code>. Example: <code>https://hostname:7047/DynamicsNAV90/WS</code></p></td></tr><tr><td><p><strong>Odata Url</strong></p></td><td><p>Base URL where the OData services are exposed in the form <code>https://&lt;Server&gt;:&lt;WebServicePort&gt;/&lt;ServerInstance&gt;/OData</code>. Example: <code>https://hostname:7048/DynamicsNAV90/OData</code></p></td></tr><tr><td><p><strong>Company Name</strong></p></td><td><p>Dynamics NAV Company to which connect. In case the field is left blank, the default configured one is used.</p></td></tr><tr><td><p><strong>Disable SSL certificate validation</strong></p></td><td><p>For HTTPS certificates, if the certificate isn’t signed by a trusted partner, the server might respond with an exception. You can disable the CN (Common Name) check. This isn’t recommended for production environments.</p></td></tr></tbody></table>

5.  On the **Advanced** tab, set **Response Timeout** and **Response Timeout Unit** if you don’t
    want the defaults. The default response timeout is 5000 milliseconds.

    For more information, see [NTLM Connection Type](https://docs.mulesoft.com/microsoft-dynamics-nav-connector/latest/ms-dynamics-nav-connector-reference#ntlm) and
    [OAuth Connection Type](https://docs.mulesoft.com/microsoft-dynamics-nav-connector/latest/ms-dynamics-nav-connector-reference#dynamics-nav-config_oauth).

6.  Click OK.

7.  Configure these fields:

    ![Dynamics NAV Connector config panel on General tab](/mulesoft/current/en-us/microsoft-dynamics-nav-connector/latest/_images/ms-dynamics-nav-op-config.png)

    - **Query**: The query to run on Dynamics NAV.

    - **Fetch Size**: Number of items retrieved on one page.

## Use Case: Studio

![Query flow](/mulesoft/current/en-us/microsoft-dynamics-nav-connector/latest/_images/ms-dynamics-nav-flow.png)

## USe Case: XML

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:nav="http://www.mulesoft.org/schema/mule/nav"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
    http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/nav
http://www.mulesoft.org/schema/mule/nav/current/mule-nav.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">

	<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config">
		<http:listener-connection host="localhost" port="8081" />
	</http:listener-config>

	<nav:dynamics-nav-config name="Nav_Connector_Dynamics_nav_config"
      doc:name="Nav Connector Dynamics nav config">
    		<nav:ntlm-connection
            domain="${config.domain}"
            username="${config.username}"
            password="${config.password}"
            soapUrl="${config.soapUrl}"
            odataUrl="${config.odataUrl}"
            companyName="${config.companyName}"
            disableCnCheck="true" />
    </nav:dynamics-nav-config>

    <flow name="query-flow">
    		<http:listener doc:name="Listener"
            config-ref="HTTP_Listener_config"
            path="/query"/>
    		<nav:odata-query fetchSize="10" doc:name="Odata query"
            config-ref="Nav_Connector_Dynamics_nav_config">
    			<nav:query>dsql: SELECT No FROM SalesOrders LIMIT 5</nav:query>
    		</nav:odata-query>
    		<ee:transform doc:name="Transform Message" >
    			<ee:message >
    				<ee:set-payload ><![CDATA[%dw 2.0
    output application/json
    ---
    payload]]></ee:set-payload>
    			</ee:message>
    		</ee:transform>
    </flow>

</mule>
```

## See Also

- [Published Page Service information](https://docs.mulesoft.com/microsoft-dynamics-nav-connector/latest/%3Chttps://learn.microsoft.com/en-us/previous-versions/dynamicsnav-2015/dd355316(v=nav.80)?redirectedfrom=MSDN>)

- [Microsoft Dynamics NAV Web Services site](https://docs.mulesoft.com/microsoft-dynamics-nav-connector/latest/%3Chttps://learn.microsoft.com/en-us/previous-versions/dynamicsnav-2016/dd355036(v=nav.90)?redirectedfrom=MSDN>)

- [Salesforce Help](https://help.salesforce.com)
