Connect Dynamics NAV
A Dynamics NAV that runs on your own servers, behind a firewall, can be connected to Peaky through a Peaky Connector. The connector reaches NAV's OData web services from inside your network and lets Peaky read from them, and nothing else. This also covers Business Central on-premises, which serves the same OData web services. A NAV reachable from the internet needs no connector — see Accounting & ERP.
Before You Start
A connector installed and Connected — see Peaky Connector (On-premise Systems), and Run on Docker, Run on Linux, Run on Windows or Run on Kubernetes. The connector's machine must be able to reach your NAV server's OData port (7048 unless you changed it).
The OData web services for the chart of accounts and G/L entries published in NAV, and a NAV user with a Web Service Access Key, as for any NAV — see Accounting & ERP.
Add NAV to the Connector
Add a target for NAV to the connector's configuration file, /etc/peaky-connector/connector.toml. Its url is the address the connector's machine reaches NAV at, with the server instance: the same address you would enter in Peaky without a connector.
[[target]]
name = "nav"
url = "https://nav.mycompany.internal:7048/DynamicsNAV140"
profile = "nav-readonly"If NAV uses a certificate from your own certificate authority, or a self-signed one, add ca_file with the path to that certificate — see The configuration file. Restart the connector to load the new target, and check that it reaches NAV:
Docker:
docker restart peaky-connector, thendocker exec peaky-connector peaky-connector check. See Run on Docker.Linux service:
sudo systemctl restart peaky-connector, thensudo systemd-run --wait --pipe --quiet --collect -p EnvironmentFile=-/etc/peaky-connector/connector.env /usr/local/bin/peaky-connector check. See Run on Linux.Windows service:
Restart-Service PeakyConnector, then& 'C:\Program Files\Peaky Connector\peaky-connector.exe' check, in PowerShell as administrator. See Run on Windows.Kubernetes: see Run on Kubernetes, then
kubectl -n peaky-connector exec peaky-connector-0 -- peaky-connector check.
Within a minute, the Connectors tab lists nav under the connector's Targets.
The nav-readonly profile
With profile = "nav-readonly", the connector lets through only requests that read NAV's OData web services, V4 and V3. Everything else is refused at the connector, whatever rights the NAV user has: creating, changing or deleting records, running actions, batches of requests, and NAV's SOAP web services. Peaky's NAV sync only ever reads, so it needs nothing more.
The profile decides what kind of request is allowed, not which records can be read: that is still up to the NAV user's permissions and which web services you published.
Connect NAV Through It
Find Dynamics NAV under the Accounting & ERP tab on the Integrations page and click Connect.
Under Where does your Dynamics NAV run?, choose On your own network, through a Peaky Connector.
Choose the Connector. The Target is filled in from what the connector reported —
navunless you named it differently. Only targets with the nav-readonly profile are offered, and the connector has to have connected once since you added it.Choose the OData version, and fill in the Company, Username and Web Service Access Key as for any NAV. Click Connect.
Peaky checks the connection through the connector before saving it, and queues the first sync. From here, NAV works as it does without a connector. Your access key is stored in Peaky like any other integration's credentials, not on the connector.
Troubleshooting
Connecting NAV says | Likely cause | What to do |
|---|---|---|
The connector is not connected to Peaky | The connector is stopped, or its machine or network is down | Start it again (see Run on Docker, Run on Linux, Run on Windows or Run on Kubernetes), wait until it shows Connected, then try again |
The connector refused the request | The configuration has no target of that name, or it lacks | Check the target's |
The connector has not reported a target of this name with the nav-readonly profile | The target is missing, has another profile, or was added after the connector last connected | Add |
Could not reach NAV at this address | The connector is running but cannot reach NAV | Run |
NAV answered, but has no OData service of this version there | The server instance in the target's | Check the instance name (such as |
NAV refused these details | The username or access key is wrong | Check the Username and Web Service Access Key on the NAV user card |
NAV has no company of this name | The Company does not match a NAV company exactly | Use one of the names the message lists |
For problems with the connector itself, see Troubleshooting on the connector's page.