Sunteți pe pagina 1din 812

Table of Contents

Welcome to the Developer and IT-Pro Help for Microsoft Dynamics NAV
Getting Started
Touring the RoleTailored Client for Developers
Legal Artefacts for Dynamics NAV
System Requirements for Microsoft Dynamics NAV 2018
Product and Architecture Overview
Client Types
Microsoft Dynamics NAV Server
SQL Server Database Components
Microsoft Dynamics NAV Web Services Overview
Development Environment (C/SIDE)
Microsoft Dynamics NAV Help Server
Additional Components
Multitenant Deployment Architecture
Accessibility
License Types
Deployment
Installation Options
Provisioning the Microsoft Dynamics NAV Server Account
Installation Considerations for Microsoft SQL Server
Working with Microsoft Dynamics NAV Setup
Deploying the Microsoft Dynamics NAV Web Server Components
Deployment Scenarios
Installing the Web Server Components
Installing and Configuring IIS
Troubleshooting
Deploying and Managing Microsoft Dynamics NAV on Microsoft Azure
Deploying Microsoft Dynamics NAV Using ClickOnce
Configuring Microsoft Dynamics NAV
Migrating to Multitenancy
Installation and Configuration Walkthroughs
Development in C/AL
Application Design Overview
Programming in C/AL
Objects
Tables
Codeunits
Pages
Reports
Queries
XMLPorts
MenuSuites
Web Services
Events in Microsoft Dynamics NAV
Notifications
Extending Microsoft Dynamics NAV
Extensions in AL
Control Add-ins
.NET Framework Interoperability
COM
Developing for the Microsoft Dynamics NAV Web Client
Developing for the Microsoft Dynamics NAV Universal App
Customizing Dynamics 365 for Sales and Dynamics NAV Integration
Multilanguage Development
Instrumenting for Telemetry
Classifying Data
Testing the Application
Debugging
Comparing and Merging Application Object Source Files
Technical Reference
C/SIDE Reference Guide
C/AL Functions
Properties
Development Environment Commands
Development in AL
Differences in the Development Environments
Running C/SIDE and AL Side-By-Side
Creating runtime packages for Dynamics NAV
Installing AL with Microsoft Dynamics NAV
Administration
Microsoft Dynamics NAV Server Administration Tool
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Managing Users
Managing Companies
Classifying Data
Administration in the Development Environment
Optimizing SQL Server Performance with Microsoft Dynamics NAV
Monitoring Microsoft Dynamics NAV Server
Monitoring Performance Counters
Monitoring Server Events
Monitoring Long Running SQL Queries
Understanding Session Timeouts
Connecting the Microsoft Dynamics NAV Clients over a Wide Area Network
Exporting and Importing Companies and Other Data
Integrating Dynamics NAV and Microsoft Office
Integrating Microsoft Dynamics NAV in SharePoint Sites
Security and Protection
Security Overview
Enhancing Microsoft Dynamics NAV Server Security
Transparent Data Encryption (TDE)
Data Security
Configuring User Authentication
Business Areas and Functional Areas
Upgrading to Microsoft Dynamics NAV 2018
Upgrade Considerations
Deprecated Fields, and Fields Marked as Obsolete
Deprecated Features in the Austrian Version
Deprecated Features in the Australian Version
Deprecated Features in the Dutch Version
Deprecated Features in the Finnish Version
Deprecated Features in the French Version
Deprecated Features in the German Version
Deprecated Features in the Italian Version
Deprecated Features in the New Zealand Version
Deprecated Features in the Norwegian Version
Deprecated Features in the Spanish Version
Deprecated Features in the Swedish Version
Deprecated Features in the Swiss Version
Deprecated Features in the UK Version
Converting a Database
Upgrading the Application Code
Upgrading the Data
Automating the Upgrade Process using Sample Windows PowerShell Scripts
Windows PowerShell Cmdlets
Administration Cmdlets
Administration Cmdlets for Extensions
Development Cmdlets
Development Cmdlets for Extensions
Preview of API Reference
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Account
Get account
Aged accounts payable
Get aged accounts payable
Aged accounts receivable
Get aged accounts receivable
Balance sheet
Get balance sheet
Cash flow statement
Get cash flow statement
Companies
Get companies
Company information
Get company information
Update company information
Complex types
Countries/regions
Get countries/regions
Create countries/regions
Update countries/regions
Delete countries/regions
Currencies
Get currencies
Create currencies
Update currencies
Delete currencies
Customer
Get customer
Create customer
Update customer
Delete customer
Customer payment
Get customer payment
Create customer payment
Update customer payment
Delete customer payment
Customer payments journal
Get customer payments journal
Create customer payments journal
Update customer payments journal
Delete customer payments journal
Customer sales
Get customer sales
Dimension
Get dimension
Dimension line
Get dimension line
Create dimension line
Update dimension line
Delete dimension line
Dimension value
Get dimension value
Employee
Get employee
Create employee
Update employee
Delete employee
General ledger entries
Get general ledger entries
Income statement
Get income statement
IRS 1099
Get IRS 1099
Create IRS 1099
Update IRS 1099
Delete IRS 1099
Item
Get item
Create item
Update item
Delete item
Item categories
Get item categories
Create item categories
Update item categories
Delete item categories
Journal
Get journal
Create journal
Update journal
Delete journal
Journal line
Get journal line
Create journal line
Update journal line
Delete journal line
Payment methods
Get payment methods
Create payment methods
Update payment methods
Delete payment methods
Payment terms
Get payment terms
Create payment terms
Update payment terms
Delete payment terms
Purchase invoice
Get purchase invoice
Create purchase invoice
Update purchase invoice
Delete purchase invoice
Purchase invoice line
Get purchase invoice line
Create purchase invoice line
Update purchase invoice line
Delete purchase invoice line
Retained earnings statement
Get retained earnings statement
Sales invoice
Get sales invoice
Create sales invoice
Update sales invoice
Delete sales invoice
Sales invoice line
Get sales invoice line
Create sales invoice line
Update sales invoice line
Delete sales invoice line
Sales credit memo
Get sales credit memo
Create sales credit memo
Update sales credit memo
Delete sales credit memo
Sales credit memo line
Get sales credit memo
Create sales credit memo
Update sales credit memo
Delete sales credit memo
Sales order
Get sales order
Create sales order
Update sales order
Delete sales order
Sales order line
Get sales order line
Create sales order line
Update sales order line
Delete sales order line
Sales quote
Get sales quote
Create sales quote
Update sales quote
Delete sales quote
Sales quote line
Get sales quote line
Create sales quote line
Update sales quote line
Delete sales quote line
Shipment methods
Get shipment methods
Create shipment methods
Update shipment methods
Delete shipment methods
Tax area
Get tax area
Create tax area
Update tax area
Delete tax area
Tax groups
Get tax groups
Create tax groups
Update tax groups
Delete tax groups
Trial balance
Get trial balance
Units of measure
Get units of measure
Create units of measure
Update units of measure
Delete units of measure
Vendor
Get vendor
Create vendor
Update vendor
Delete vendor
Vendor purchases
Get vendor purchases
Welcome to the Developer and IT-Pro Help for
Microsoft Dynamics NAV
3/26/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV 2018 is a complete enterprise resource planning (ERP ) software solution for mid-sized
organizations that is fast to implement, easy to configure, and simple to use. Right from the start, simplicity has
guided—and continues to guide—innovations in product design, development, implementation, and usability. In
this section, you can find information about deployment and administration, and you can find information about
developing for Dynamics NAV.

NOTE
You also use Microsoft Dynamics NAV 2018 to develop for Dynamics 365 Business Central.

TO SEE

Learn how to install, deploy, and configure Microsoft Deployment


Dynamics NAV 2018

Learn about developing in AL Development in AL

Learn about developing in C/AL Development in C/AL

Learn about administration tools and processes for Microsoft Administration


Dynamics NAV 2018

Find AL reference information, including methods, triggers, AL Development Environment


properties and APIs

Find reference information, including C/AL functions, triggers, Technical Reference


properties, development environment commands, and
development environment windows

Learn how to develop with the new development environment Getting Started

NOTE
Don't know why you ended up here? Were you trying to find the Dynamics NAV developer center on MSDN, perhaps? Or
were you trying to find another location that has been deprecated? We apologize for the confusion, but across Microsoft we
are deprecating some sites and moving content around. That means that the developer center is no longer available, and
neither is the icon library that we published there. Due to redirection, you don't always end up where you expect, but this
page will be the landing page for developer and IT-pro content for Dynamics NAV going forward.

Feedback
At the bottom of each article, you can submit feedback either for the product or for the documentation. At this
point in time, both links point at Dynamics 365 Business Central for technical reasons. But if you submit feedback
about the Dynamics NAV docs in the Dynamics 365 GitHub repo, we will triage it and apply relevant changes here
in the docs for Dynamics NAV.
Previously submitted feedback has not been deleted but is no longer visible online. Please read the
Docs.microsoft.com blog for more information.

See Also
System Requirements for Microsoft Dynamics NAV
Extending Microsoft Dynamics NAV Using Extension Packages
Accessibility
Terms of Use
Getting Started
1/2/2018 • 1 min to read • Edit Online

To get started developing for Microsoft Dynamics NAV 2018 and for Dynamics 365 Business Central, see the
following topics.

Learn about AL
TO SEE

Get started developing extensions using AL Getting Started with AL

Learn how to upgrade from Extensions V1 to Extensions V2 Converting Extensions V1 to V2 Overview

Find AL reference information, including methods, triggers, AL Development Environment


properties, and API documentation

Learn about Microsoft Dynamics NAV


TO SEE

Learn how to install, deploy, and configure Microsoft Dynamics Deployment


NAV 2018

Learn how to upgrade from an earlier version to Microsoft Upgrading to Microsoft Dynamics NAV 2017
Dynamics NAV 2018

Learn about the Microsoft Dynamics NAV Windows client from Touring the RoleTailored Client for Developers
the perspective of a developer

Learn about the Microsoft Dynamics NAV Web client from the Microsoft Dynamics NAV Web Client
perspective of a developer

Learn about developing for the Microsoft Dynamics NAV Developing for the Microsoft Dynamics NAV Universal App
Universal App from the perspective of a developer

Read about application security Security and Protection

Learn about C/SIDE


TO SEE

Learn about C/SIDE development options for Microsoft Development


Dynamics NAV 2018

Develop C/SIDE tables, codeunits, pages, reports, queries, Objects


XMLports, and MenuSuites in Microsoft Dynamics NAV 2018
TO SEE

Find reference information, including C/AL functions, triggers, Technical Reference


properties, development environment commands, and
development environment windows

Watch videos to learn more about development and UI on the Microsoft Dynamics NAV Dev Center
MSDN Dev Center for Dynamics NAV
Touring the RoleTailored Client for Developers
1/2/2018 • 1 min to read • Edit Online

This section provides a visual overview of the generic RoleTailored client design, the Microsoft Dynamics NAV
Development Environment, including a description of the different windows, pages, parts, and general
terminology.

In This Section
RoleTailored Client Design Principle
Touring the RoleTailored Client Windows
Touring the RoleTailored Client Pages
Legal Resources for Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This page provides links to legal information for the Microsoft Dynamics NAV software specified below.

Microsoft Dynamics NAV 2017


Software License Terms
Third Party Notices
Privacy Statement
Copyright and Trademarks

See Also
Welcome to the Developer and IT-Pro Help for Microsoft Dynamics NAV
Legal Resources for Microsoft Dynamics NAV Universal Apps
System Requirements for Microsoft Dynamics NAV
2018
5/31/2018 • 12 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
The following sections list the minimum hardware and software requirements to install and run Microsoft
Dynamics NAV 2018. Minimum means that later versions (such as SP1, SP2, or R2 versions) of a required
software product are also supported.

NOTE
Dynamics NAV Setup installs some software if it is not already present in the target computer. For more information, see the
"Additional Information" section for each component.

Client Components
Dynamics NAV Windows Client Requirements
The following table shows the minimum system requirements for the Microsoft Dynamics NAV Windows client.

Supported operating systems Windows 10 Pro, Enterprise, or Education (32-bit and


64-bit editions).
Important: Windows 10 S is not supported.
Windows 8.1 Professional or Enterprise (32-bit and
64-bit editions).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012 R2 Standard or Essentials (64-
bit edition).
Windows Server 2012 Standard or Essentials (64-bit
edition).

Hardware resources Hard disk space: 200 MB.


Memory: 1 GB.

Reports For editing RDLC report layouts:


Report Builder for SQL Server 2016 or Visual
Studio 2017 with Microsoft Rdlc Report
Designer for Visual Studio installed.
For editing Word layouts:
Microsoft Word 2013 or later

Instant messaging and Telephony API Microsoft Lync 2013 or Microsoft Lync 2010.
Outlook client integration and mail merge Microsoft Office 365, Microsoft Office 2016, Microsoft
Office 2013 Service Pack 1 (SP1), or Microsoft Office
2010 Service Pack 2 (SP2).

Import and export with Microsoft Excel and Office XML, and Microsoft Office 2016, Microsoft Office 2013 SP1,
SharePoint links Microsoft Office 2010 SP2, or Microsoft Office 365.

Editing in Excel using the Excel Add-in Excel 2016.


For more information, see Setting up the Excel Add-In
for Editing Dynamics NAV Data.

OneNote integration Microsoft Office 2016, Microsoft Office 2013 SP1, or


Microsoft Office 2010 SP2.

Email logging Active Directory and Microsoft Exchange Server 2013.


Microsoft Exchange Online, or Exchange Online as part
of an Office 365 subscription.

Additional software Microsoft .NET Framework 4.7.

Additional information Dynamics NAV Setup installs the following software if


it is not already present in the target computer:
Microsoft .NET Framework 4.7.
The Microsoft Dynamics NAV Windows client is
available in a 32-bit version and 64-bit version. On a
32-bit Windows operating system, the 32-bit version
is run. On a 64-bit Windows operating system, the
64-bit version is run by default; however, you can also
run the 32-bit version if it is required.
Dynamics NAV Setup can only install the Excel Add-in
if Excel is present on the target computer.
Outlook synchronization is not supported on 64-bit
versions of Office.

Dynamics NAV Development Environment Requirements


The following table shows the minimum system requirements for the Microsoft Dynamics NAV Development
Environment.

Supported operating systems Windows 10 Pro, Enterprise, or Education (32-bit and


64-bit editions).
Windows 8.1 Professional or Enterprise (32-bit and
64-bit editions).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012 R2 Standard or Essentials (64-
bit edition).
Windows Server 2012 Standard or Essentials (64-bit
edition).
Hardware resources Hard disk space: 200 MB.
Memory: 1 GB.

Reports For creating and editing RDLC report layouts:


Report Builder for SQL Server 2016, or
One of the following versions of Visual Studio:
Visual Studio 2017 with Microsoft Rdlc
Report Designer for Visual Studio
installed.
Visual Studio 2015 Professional or
Enterprise edition with SQL Server Data
Tools installed.
Important: Before you install Visual
Studio 2015, install Microsoft .NET
Framework 4.7; otherwise, an error will
occur when you compile or run RDLC
reports. For more information, see
Report error "Visual Basic Command
Line Compiler has stopped working".
For upgrading reports:
Report Builder for SQL Server 2016
For creating Word report layouts:
Word 2013 or later

Additional software Microsoft .NET Framework 4.7.

Additional information Dynamics NAV Setup installs the following software if


it is not already present in the target computer:
Microsoft .NET Framework 4.7.
SQL Server Native Client 11.0.
Report Builder for SQL Server 2016. This is not
installed if a version of SQL Server Report
Builder or Microsoft Visual Studio is already
present on the target computer
If the development environment and Microsoft
Dynamics NAV Server are on the same computer, then
only a 64-bit operating system is supported.

Dynamics NAV Web Client Requirements


The following table shows the minimum system requirements for the Dynamics NAV Web client.

Supported browsers Microsoft Edge.


Internet Explorer 11.
Google Chrome 61.0 for Windows.
Mozilla Firefox 55.0 for Windows.
Safari 10.0 for macOS.
For a list of browser limitations, see Browser Limitations with
the Microsoft Dynamics NAV Web Client.

Business inbox in Outlook Microsoft Office 365.


Sending data to Excel Microsoft Office 2016, Microsoft Office 2013 SP1,
Microsoft Office 2010 SP2, or Microsoft Office 365.

Editing in Excel using the Excel Add-in Excel 2016.

For more information, see Setting up the Excel Add-In


for Editing Dynamics NAV Data.

SharePoint Online links Microsoft Office 2016, Microsoft Office 2013 SP1,
Microsoft Office 2010 SP2, or Microsoft Office 365.

Printing reports to Excel or Word Microsoft Office 2016, Microsoft Office 2013 SP1,
Microsoft Office 2010 SP2, or Microsoft Office 365.

Additional information If you experience problems using the Microsoft Dynamics


NAV Web client, you can try to turn off browser tools, such as
translator tools that may run in the background.

Dynamics NAV Tablet Client and Phone Client (in a Browser) Requirements
The following table shows the minimum system requirements for the Microsoft Dynamics NAV Tablet client and
Microsoft Dynamics NAV Phone client running in a browser when used for development and testing purposes.

Server component Identical to the Dynamics NAV Web client.

Supported browsers The following desktop browsers are supported:


Microsoft Edge
Internet Explorer 11 (build 11.0.9600.17239) for
Windows 10 and for Windows 8.1 (32-bit and 64-bit
versions).
Google Chrome 61.0 for Windows.
Mozilla Firefox 55.0 for Windows.
Safari 10.0 for macOS.

Dynamics NAV Universal App Requirements


The following table shows the minimum system requirements for the Microsoft Dynamics NAV Universal App.
For the latest information, see Dynamics NAV for Windows, Dynamics NAV for iPad and iPhone, and Dynamics
NAV for Android tablet and Android phone.

Supported operating systems Windows 10 S, Home, Pro, Enterprise, or Education


(32-bit and 64-bit editions).
Android 5.0 or higher (tablet and phone).
iOS 10.0 or higher (iPad and iPhone).

Additional hardware 1 GB RAM for Android and Windows.


Additional software A third-party telephony or VoIP app such as Skype or
Lync is required for placing calls from Dynamics NAV.
A third-party email program such as Outlook is
required for sending emails from Dynamics NAV.
Microsoft Office 2013 SP1 or Microsoft Office 365 is
required for sending data to Microsoft Excel or to
Microsoft Word.

Additional information Device diagonal screen size 7” for tablets.


Screen resolution 960 × 510 for tablets.
Device diagonal screen size 4” for phones.
Screen resolution 854 x 480 for phones.

Server Components
Dynamics NAV Server Requirements
The following table shows the minimum system requirements for Microsoft Dynamics NAV Server.

Supported operating systems Windows 10 Pro, Enterprise, or Education (64-bit


edition).
Windows 8.1 Professional or Enterprise (64-bit
edition).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012 R2 Standard or Essentials (64-
bit edition).
Windows Server 2012 Standard or Essentials (64-bit
edition).

Hardware resources Hard disk space: 500 MB.


Memory: 2 GB.

Microsoft Dynamics 365 for Sales integration Windows Identity Framework.


For a list of supported Microsoft Dynamics 365 for
Sales versions, see Microsoft Dynamics 365 for Sales
Integration Requirements.

Additional software Microsoft .NET Framework 4.7.


Windows PowerShell 3.0.

Additional information Dynamics NAV Setup installs the following software if


it is not already present on the target computer:
Microsoft .NET Framework 4.7.
Windows Identity Framework.

Dynamics NAV Web Server Components Requirements


Supported operating systems Windows 10 Pro, Enterprise, or Education (64-bit
edition).
Windows 8.1 Professional or Enterprise (64-bit
edition).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012 R2 Standard or Essentials (64-
bit edition).
Windows Server 2012 Standard or Essentials (64-bit
edition).

Web server Internet Information Server 10, Internet Information


Server 8.5, or Internet Information Server 8.0.

Additional software Microsoft .NET Framework 4.7.


Windows PowerShell 3.0.

Additional information Dynamics NAV Setup installs the following software if


it is not already present on the target computer.
Microsoft .NET Core 1.0 Windows Server
Hosting. This is installed by Dynamics NAV
Setup if not already present.
Microsoft .NET Framework 4.7.
Internet Information Server 10, Internet
Information Server 8.5, or Internet Information
Server 8.0, depending in the operating system,
with the required features enabled.
For more information about installing IIS, see How to:
Install Internet Information Services for Microsoft
Dynamics NAV Web Client.

Dynamics NAV Database Components for SQL Server Requirements


The following table shows the minimum system requirements for Dynamics NAV database components for SQL
Server.

Supported operating systems Windows 10 Pro, Enterprise, or Education (64-bit


edition).
Windows 8.1 Professional or Enterprise (64-bit
edition).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012 R2 Standard or Essentials (64-
bit edition).
Windows Server 2012 Standard or Essentials (64-bit
edition).

Hardware resources For more information, see Hardware and Software


Requirements for Installing SQL Server 2016. From this page,
you can also access requirements for other versions of SQL
Server.
SQL Server Microsoft SQL Server 2017 Express, Standard or
Enterprise.
Microsoft SQL Server 2016 Express, Standard or
Enterprise.
Microsoft SQL Server 2014 Express, Standard or
Enterprise.
Azure SQL Database V12 Standard and Premium
service tiers.

For more information, see Installation Considerations


for Microsoft SQL Server.

Service Packs and Cumulative Updates Unless explicitly stated, all released Service Packs and
Cumulative Updates of the above Microsoft SQL Server
versions are supported. It is recommended to always be on
the latest released Service Pack and Cumulative Update.

Additional information Dynamics NAV Setup installs the following software if it is not
already present on the target computer:
SQL Server 2016 Express (64-bit edition).
If the operating system on the target computer does
not support SQL Server 2016 Express, Setup displays
a pre-requisite warning. In this case you should exit
Setup and then update the operating system on the
computer to one that does support SQL Server 2016
Express. Then run Setup again.

Dynamics NAV Help Server Requirements


The following table shows the minimum system requirements for the Dynamics NAV Help Server.

Supported operating systems Windows 10 Pro, Enterprise, or Education (64-bit


editions).
Windows 8.1 Professional or Enterprise (64-bit
edition).
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012.
Windows Server 2012 Essentials.

Hardware resource Hard disk space: 500 MB.


Memory: 2 GB.

Web server Internet Information Server 10, Internet Information


Server 8.5, or Internet Information Server 8.0.

Additional software Microsoft .NET Framework 4.7.


Additional information Dynamics NAV Setup installs the following software if
it is not already present on the target computer.
Microsoft .NET Framework 4.7.
Internet Information Server 10, Internet
Information Server 8.5, or Internet Information
Server 8.0. depending on the operating
system, with the required features enabled.
For more information about installing IIS, see How to:
Install Internet Information Services for Microsoft
Dynamics NAV Web Client.
Windows Search must be enabled on the computer
that you install the Dynamics NAV Help Server on. If
you install on Windows Server 2012, and Windows
Search is not enabled as a file service, Dynamics NAV
Setup adds the service. However, the changes do not
take effect until the computer has restarted.

Additional Components and Features


Automated Data Capture System Requirements
The following table shows the minimum system requirements for Automated Data Capture System (ADCS ) for
Dynamics NAV.

Additional software MSXML version 6.0.


Telnet or Microsoft Windows HyperTerminal.
VT100 Plug-in for each computer on which you install
ADCS.
Microsoft Loopback Adapter.

Additional information HyperTerminal is no longer included with Windows. For


more information, see What happened to
HyperTerminal? in the Windows Help.
VT100 Plug-in acts as a virtual Telnet server.

Business Inbox in Microsoft Outlook Requirements


The following table shows the minimum system requirements for using Dynamics NAV as your business inbox in
Outlook.

Supported Outlook Applications Outlook 2013 or later


Outlook Web App
OWA for iPad
OWA for iPhone
OWA for Android.
Supported Exchange Servers Exchange Online
Exchange Server 2016
Exchange Server 2013.
In deployments that use Exchange Server, the
Exchange PowerShell endpoint must be accessible by
Microsoft Dynamics NAV Server.

Supported Authentication The Microsoft Dynamics NAV Server must be


configured to run with NavUserPassword, ACS, or AAD
Credentials Type.
Also, the Microsoft Dynamics NAV Web client must be
configured for Secure Sockets Layer (SSL).

Supported Browsers When using the Outlook Web App (OWA), your
computer must be running a supported browser listed
in the Microsoft Dynamics NAV Web client
Requirements.

Supported Operating Systems When using OWA for iPad, OWA for iPad, or OWA for
Android, your mobile device must use a supported
Operating System listed in Microsoft Dynamics NAV
Universal App Requirements.

Microsoft Outlook Add-In Requirements


The following table shows the minimum system requirements for the Dynamics NAV Add-In for Outlook for
synchronization with Outlook.

Supported Outlook Applications Outlook 2016


Outlook 2013 SP1
Outlook 2010 SP2 (32-bit edition).

Supported Exchange Servers Exchange Server 2016


Exchange Server 2013
Exchange Online.

Microsoft Dynamics 365 for Sales Integration Requirements


The following table shows the system requirements for integrating Dynamics NAV with Microsoft Dynamics 365
for Sales.
Microsoft Dynamics CRM versions Microsoft Dynamics CRM 2015 or Microsoft Dynamics
CRM 2016
Note: AD, IFD and Claims authentication types are
supported for above editions.
Microsoft Dynamics CRM Online 2015, Microsoft
Dynamics CRM Online 2015 Update 1, or Microsoft
Dynamics CRM Online 2016 Update 1 or Microsoft
Dynamics 365
Note: Oauth and Office365 authentication types are
supported for these editions.
For more details on authentication types, see Connection
strings in XRM tooling to connect to Dynamics 365.

Dynamics NAV Integration Solution (.zip) For Dynamics CRM 2015, Dynamics CRM Online 2015, and
Dynamics CRM Online 2015 Update 1:
Use the DynamicsNAVIntegrationSolution.zip file that
is found on the Dynamics NAV 2016 installation media
(DVD) to install the solution.
Item Availability is not supported on Dynamics CRM
2015, versions Update 1 and Online.
For more information, see How to: Prepare Dynamics 365 for
Sales for Integration.

Dynamics NAV as an App for SharePoint Requirements


The following table shows the minimum system requirements for Dynamics NAV as an App for SharePoint.

Supported operating systems Windows Server 2016 Standard, Essentials, or


Datacenter.
Windows Server 2012 R2 Standard or Datacenter (64-
bit edition).
Windows Server 2012 Standard or Datacenter (64-bit
edition).

Additional software SharePoint 2013 Service Pack 1.


SharePoint Online.

Automated Deployment on Microsoft Azure Requirements


Automated deployment of Dynamics NAV on Microsoft Azure by using the provisioning tools is only supported
on Azure virtual machines that are running Windows Server 2012. For additional requirements for specific
Dynamics NAV components, refer to the other sections in this topic.

See Also
Welcome to the Developer and IT-Pro Help for Microsoft Dynamics NAV
Product and Architecture Overview
Installation Options
Client Types
How to: Configure SSL to Secure the Connection to Microsoft Dynamics NAV Web Client
Microsoft Dynamics NAV Architecture Overview
1/2/2018 • 2 min to read • Edit Online

The Microsoft Dynamics NAV 2018 architecture comprises three core components as well as various additional
tools and components. Use Dynamics NAV Setup to install all components.

The Dynamics NAV Three-Tier Architecture


For every deployment of Microsoft Dynamics NAV 2018 you must install the core components, which are the
three tiers that make up the Dynamics NAV architecture.
1. The RoleTailored client is the client tier, which includes a Microsoft Dynamics NAV Windows client and a
Microsoft Dynamics NAV Web client.
In addition to the RoleTailored client, Microsoft Dynamics NAV 2018 also supports additional client types,
including web service clients and a NAS services client for programmatic access. For details on the various
client types, see Client Types.
2. Microsoft Dynamics NAV Server is the middle or server tier, managing all business logic and
communication.
3. SQL Server, augmented by Microsoft Dynamics NAV 2018 database components, is the data tier.
If you deploy Dynamics NAV in a multitenant deployment architecture, the data tier consists of an
application database and one or more tenant databases.

IMPORTANT
When you install Microsoft Dynamics NAV 2018, all components must be from the same version and build of Dynamics NAV
for the software to run correctly.

You can have multiple instances of any of the core components in a production environment. The following
diagram shows a simple installation with two Microsoft Dynamics NAV Windows clients and a Microsoft
Dynamics NAV Web client connecting to a single Microsoft Dynamics NAV Server computer, which in turn
connects to a computer with SQL Server and the Dynamics NAV database components.
Some common configurations are:
All three components on the same computer. This is the configuration for a demo install, and is also typical
for a development environment, so that a developer can work on Dynamics NAV applications without
worrying about network connections and inter-component security. See Walkthrough: Installing the Demo
Version.
RoleTailored client and Microsoft Dynamics NAV Server on the same computer, data tier on a separate
computer. This scenario is described in Walkthrough: Installing the Three Tiers On Two Computers.
Each of the three tiers on a separate computer. This scenario is described in Walkthrough: Installing the
Three Tiers on Three Computers.

Additional Components
In addition to the three core components, there are additional components that enhance or supplement the core
components.

COMPONENT PURPOSE

Microsoft Dynamics NAV Help Server A website with the Help content for Dynamics NAV in the
languages that your version of Dynamics NAV includes. You
can deploy a single Help Server for all users, or customer-
specific Help Servers, depending on your requirements.

Web Server Components. See How to: Install the Web Server The components that are needed to enable Microsoft
Components. Dynamics NAV Web clients to connect with a browser.

Microsoft Dynamics NAV Server Administration Tool A tool for configuring and managing Microsoft Dynamics NAV
Server and Dynamics NAV sites.

Development Environment (C/SIDE) The Development Environment for creating and modifying
Dynamics NAV applications in C/AL.

Microsoft Office Outlook Add-In A component for synchronizing data, such as to-dos,
contacts, and tasks, between Dynamics NAV and Outlook.

Automated Data Capture System A Dynamics NAV tool for accurately capturing data for
inbound, outbound, and internal documents, primarily in
connection with warehouse activities. With ADCS, company
employees use handheld devices and radio frequency
technology to continuously validate warehouse inventories.

ClickOnce Installer Tools. See Deploying Microsoft Dynamics A set of tools designed to create ClickOnce deployments for
NAV Using ClickOnce. applications for the Microsoft Dynamics NAV Windows client.

See Also
Deployment
Working with Microsoft Dynamics NAV Setup
Multitenant Deployment Architecture
Client Types
1/2/2018 • 4 min to read • Edit Online

The following Dynamics NAV clients interact with the Dynamics NAV database through Microsoft Dynamics NAV
Server:
Microsoft Dynamics NAV Windows client
Microsoft Dynamics NAV Web client
Microsoft Dynamics NAV Tablet client and Microsoft Dynamics NAV Phone client
Of these client types, the Microsoft Dynamics NAV Windows client is the only one that you explicitly install
and configure with Dynamics NAV Setup.
In addition, the following service types also interact with the Dynamics NAV database through Microsoft
Dynamics NAV Server:
SOAP web services
OData web services
NAS services
You can configure a server instance for RoleTailored clients, SOAP and OData web services, and NAS
connections using either the Microsoft Dynamics NAV Server Administration Tool or Microsoft Dynamics
NAV Windows PowerShell Cmdlets.

Microsoft Dynamics NAV Windows client


The Microsoft Dynamics NAV Windows client is an intuitive and versatile Windows application that developers,
partners, administrators, and super users can customize to support the job functions of a full range of work roles
in an organization.
For each role, the Microsoft Certified Partner or developer creates a customizable Role Center that displays key
information required for relevant employees and makes their day-to-day tasks easier to complete. Users run the
RoleTailored client to find the information and data entry points that their jobs require.
The Microsoft Dynamics NAV Windows client is installed when you select the Demo Option, Client Option, or
Developer Option in Dynamics NAV Setup. The Microsoft Dynamics NAV Windows client is available in a 32-bit
version and 64-bit version. The 32-bit version of the Microsoft Dynamics NAV Windows client can be run on
either a 32-bit or 64-bit version of a Windows operating system. The 64-bit version of the Microsoft Dynamics
NAV Windows client can only be run on a 64-bit version of a Windows operating system. On a 64-bit Windows
operating system, the 64-bit version of the Microsoft Dynamics NAV Windows client is used by default, but you
can to run the 32-bit version as well. For more information, see Running 32-Bit Microsoft Dynamics Windows
Client on 64-Bit Windows.

Microsoft Dynamics NAV Web client


The Microsoft Dynamics NAV Web client is an alternative to the Microsoft Dynamics NAV Windows client that
enables you to access Dynamics NAV data over the Internet. From a web browser, you can view and edit data by
using an interface that is similar to the Microsoft Dynamics NAV Windows client. Install the Web Server
components to get the software that you need to set up a Microsoft Dynamics NAV Web client. For more
information, see Microsoft Dynamics NAV Web Client.
Microsoft Dynamics NAV Tablet client and Microsoft Dynamics NAV
Phone client
The Microsoft Dynamics NAV Tablet client and Microsoft Dynamics NAV Phone client allow users in small and
medium sized businesses to access data from a tablet or a phone. Developing for Microsoft Dynamics NAV Tablet
client and Microsoft Dynamics NAV Phone client is very similar to developing for the Microsoft Dynamics NAV
Web client using the Microsoft Dynamics NAV Development Environment. For more information, see Developing
for the Microsoft Dynamics NAV Universal App.

SOAP Web Services


SOAP web services allow full flexibility for building operation-centric services. This includes industry standard
interoperability, as well as channel and host plug-ability. For web services that must interoperate with Java or use
channels other than HTTP, SOAP services are the only option. Windows Communication Framework (WCF ) has
supported SOAP services since its initial release in .NET Framework 3.0, and .NET Framework 4 adds additional
support and default bindings to make it easier to build SOAP services using WCF. You define and publish
Microsoft Dynamics NAV 2018 SOAP web services in the RoleTailored client, and manage them from the
Microsoft Dynamics NAV Server Administration tool. See SOAP Web Services for further information.

OData Web Services


OData services are recommended for client applications that require a uniform, flexible, general purpose. They are
less suited for applications that are primarily method-oriented or in which data operations are constrained to
certain prescribed patterns. OData supports Representational State Transfer (REST)-based data services, which
enable resources, identified using Uniform Resource Identifiers (URIs), and defined in an abstract data model
(EDM ), to be published and edited by web clients within corporate networks and across the Internet using simple
Hypertext Transfer Protocol (HTTP ) messages. OData services are lightweight, with functionality often referenced
directly in the URI. You define and publish Microsoft Dynamics NAV 2018 OData web services in the RoleTailored
client, and manage them from the Microsoft Dynamics NAV Server Administration tool. See OData Web Services
for further information.

NAS Services
NAS services are a middle-tier server component that executes business logic without a user interface or user
interaction. NAS services are intended for task scheduling, client offloading, and specialized integration scenarios.
NAS services replace the NAV Application Server (NAS ) available in earlier versions of Dynamics NAV. You
manage NAS services from the Microsoft Dynamics NAV Server Administration tool. See Configuring NAS
Services for further information.

See Also
Product and Architecture Overview
Installation Options
Web Service Alternatives: SOAP and OData
Microsoft Dynamics NAV Server Administration Tool
Working with Microsoft Dynamics NAV Server
1/2/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV Server is a .NET-based Windows Service application that manages communications
between Dynamics NAV clients and Dynamics NAV databases in SQL Server. It uses the Windows
Communication Framework (WCF ) as its communication protocol.
Microsoft Dynamics NAV Server uses an ADO.NET interface, which is a managed data access layer that supports
SQL Server connection pooling. This simplifies deployment of the Dynamics NAV three-tier architecture for
deployments where the three tiers are installed on separate computers. Specifically, administrators are not required
to manually create service principal names (SPNs) or to set up delegation when the client, Microsoft Dynamics
NAV Server, and SQL Server are on separate computers. For more details, see Data Access.
Microsoft Dynamics NAV Server supports a range of different client types. This includes the Microsoft Dynamics
NAV Windows client and the Microsoft Dynamics NAV Web client and two types of web services. For more
information, see Client Types. You administer Microsoft Dynamics NAV Server using either Microsoft Dynamics
NAV Server Administration tool or Windows PowerShell cmdlets. For more information, see Microsoft Dynamics
NAV Server Administration Tool or Microsoft Dynamics NAV Windows PowerShell Cmdlets.
Microsoft Dynamics NAV Server is installed when you select either the Server Option or the Developer Option in
Dynamics NAV Setup.

NOTE
Installing Microsoft Dynamics NAV Server on encrypted drives is not supported. You may experience issues if the server runs
as a user that does not have access rights to the encrypted files.

NOTE
You can install Microsoft Dynamics NAV Server only on 64-bit operating systems.

See Also
Server Option
System Requirements for Microsoft Dynamics NAV
Configuring Microsoft Dynamics NAV Server
Enhancing Microsoft Dynamics NAV Server Security
SQL Server Database Components
1/2/2018 • 1 min to read • Edit Online

SQL Server database components configure Microsoft SQL Server to work with Microsoft Dynamics NAV 2018.
If SQL Server is not present on the computer where you install the database components, then Setup
automatically installs SQL Server Express 2016, which you can use for prototyping, developing, and testing. We
recommend that you use SQL Server 2016 or SQL Server 2014 in production environments.
If you are installing the CRONUS International Ltd. demonstration database, Setup will automatically install SQL
Server Express 2016 if it does not find an existing NAVDEMO instance in SQL Server. So if you intend to install
the CRONUS database to an existing SQL Server installation, remember to create a NAVDEMO instance in SQL
Server before you run Dynamics NAV Setup.
In Dynamics NAV Setup, SQL Server database components are a default component for the Developer Option.
You can add the components to the Server Option or as part of a custom installation.
When you have installed the Dynamics NAV SQL Server database components on a database server, you can
create new Dynamics NAV databases in the Dynamics NAVdevelopment environment, by using the development
environment commands, or by using the Dynamics NAV Windows PowerShell cmdlets.

See Also
Developer Option
Custom Option
Configuring Database Components
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Development Environment Commands
Microsoft Dynamics NAV Web Services Overview
1/2/2018 • 4 min to read • Edit Online

Web services are a lightweight, industry-standard way to make application functionality available to a variety of
external systems and users. Microsoft Dynamics NAV 2018 supports creation and publishing of Dynamics NAV
functionality as web services. You can expose pages, codeunits, or queries as web services, and even enhance a
page web service by using an extension codeunit. When you publish Dynamics NAV objects as web services, they
are immediately available on the network.
Developers can publish two types of web services from Dynamics NAV objects:
SOAP Web Services. You can publish either Dynamics NAV pages or codeunits as SOAP services.
OData Web Services. You can publish either pages or queries as OData services.
Dynamics NAV web services are stateless and do not preserve the values of global variables or single-
instance codeunits between calls.

Web Service Protocols


The following table shows the types of web service applications that you can create for the web service protocols
supported in Microsoft Dynamics NAV 2018.

SOAP WEB SERVICES ODATA WEB SERVICES

Pages Yes: Create, Read, Update, and Delete Yes: Create, Read, Update, and Delete
operations (CRUD) operations (CRUD)

Codeunits Yes No

Queries No Yes: Read-only

For more information about the difference between these protocols, see Web Service Alternatives: SOAP and
OData.
Page Web Services
When you expose a page as an OData web service, you can query that data to return a service metadata (EDMX)
document, an AtomPub document, or a JavaScript Object Notation (JSON ) document. You can also write back to
the database if the exposed page is writable. For more information, see OData Web Services.
When you expose a page as a SOAP web service, you expose a default set of operations that you can use to
manage common operations such as Create, Read, Update, and Delete. Page-based web services offer built-in
optimistic concurrency management. Each operation call in a page-based web service is managed as a single
transaction.
For SOAP services, you can also use extension codeunits to extend the default set of operations that are available
on a page. Adding an extension codeunit to a page is useful if you want to perform operations other than the
standard Create, Read, Update, and Delete operations. The benefit of adding an extension codeunit to a page is that
you can make the web service complete by adding operations that are logical to that service. Those operations can
use the same object identification principle as the basic page operations. For an example of how to implement an
extension codeunit, see Walkthrough: Creating a Web Service using Extension Codeunits (SOAP ).
Codeunit Web Services
For SOAP services only, codeunit web services provide you with the most control and flexibility. When a codeunit
is exposed as a web service, all functions defined in the codeunit are exposed as operations.
Query Web Services
When you expose a Dynamics NAV query as an OData web service, you can query that data to return a service
metadata (EDMX) document or an AtomPub document. For more information about how to create and use
Dynamics NAV queries, see Queries.

Web Services and Regional Settings


Data is formatted according to the value of the Services Language setting for the relevant Microsoft Dynamics
NAV Server instance. The default value is en-us. This means that Microsoft Dynamics NAV Server interprets all
incoming data as the specified culture, such as dates and amounts.
If you know that the Services Language setting is always en-us, for example, your code can be based on that
assumption. In a multilanguage environment, you will see more predictable transformations of data if data that is
transmitted through web services is in a consistent culture.
Similarly, you can use the ServicesOptionFormat setting to specify how Microsoft Dynamics NAV Server must
understand option values. If you set the ServicesOptionFormat setting to OptionString, Microsoft Dynamics
NAV Server understand option values as the name of the option value, which is always en-us. If you set the setting
to OptionCaption, web service data will be interpreted in the language specified by the Services Language
setting.

NOTE
In earlier versions of Dynamics NAV, you could enable ServicesCultureDefaultUserPersonalization on the Microsoft
Dynamics NAV Server instance. This was deprecated in Microsoft Dynamics NAV 2016 in order to guarantee that web
services have a consistent culture.

Web Services in Multitenant Deployments


If your Dynamics NAV solution is used in a multitenant deployment architecture, you must make sure that any
code that generates or consumes a web service specifies the relevant tenant. Web services are set up in the
application, but typically you want to consume company-specific and tenant-specific data.
If you use the GETURL function, the generated URL will automatically apply to the user’s tenant ID. For more
information, see GETURL Function.
The URL for accessing a web service in a multitenant deployment must specify the tenant ID in one of two ways:
As a query parameter, or as a host name. If you use host names for tenants, the host name must be specified as an
alternative ID.
For example, the following URL consumes the Customer ODATA web service for a specific tenant:

http://localhost:7048/DynamicsNAV/OData/Company('CRONUS-International-Ltd.')/Customer?Tenant=Tenant1

For more information, see Multitenant Deployment Architecture.

See Also
How to: Publish a Web Service
Web Service Alternatives: SOAP and OData
SOAP Web Service URIs
How to: Use SystemService to Find Companies
Basic Page Operations
Web Services Best Practices
Configuring Microsoft Dynamics NAV Server
Development Environment (C/SIDE)
1/2/2018 • 2 min to read • Edit Online

You use the Microsoft Dynamics NAV Development Environment to develop Dynamics NAV applications. In
earlier versions of Dynamics NAV, this component was also an end-user client, but this changed in Microsoft
Dynamics NAV 2013.
The administrator who installs Microsoft Dynamics NAV 2018 automatically has access to the Dynamics NAV
database in the development environment. To grant another user permission to work with a particular Dynamics
NAV database with development environment, grant that user db_owner role on the database in SQL Server
Management Studio. To grant another user permission to create new databases in development environment,
grant that user the dbcreator and securityadmin Server Roles for the Dynamics NAV SQL Server instance in SQL
Server Management Studio. For information about how to grant these roles, see Setting Database Owner and
Security Administration Permissions.

WARNING
If you install the development environment on a 64-bit computer and you do not install any other Dynamics NAV
components, you may receive the following message:
The program cannot start because MSVCP100.dll is missing.
If you see this error message, download and install the Microsoft Visual C++ 2010 Redistributable Package (x86). You can
then run the development environment.

Object Designer
When you open the development environment, you can open Object Designer, which gives you access to
Dynamics NAV objects. You use Object Designer to modify the application or to create new application areas. For
more information, see Object Designer).
If you migrate your solution to a multitenant deployment architecture, Microsoft Dynamics NAV Development
Environment can only access the application database. For more information, see Multitenant Deployment
Architecture.

Debugging with the Microsoft Dynamics NAV Development


Environment
If you use the development environment for debugging and want to be able to set breakpoints, the following must
be true:
You must be a Dynamics NAV user. See How to: Create Microsoft Dynamics NAV Users.
You must have a Login for the Dynamics NAV database. You must also assign that Login the db_owner
database role. Use SQL Server Management Studio to create logins and assign roles. See Setting Database
Owner and Security Administration Permissions for detailed information.
There are additional requirements exist if you are using NavUserPassword or AccessControlService
authentication:
Your Login for the Dynamics NAV database must match your User Name in Dynamics NAV.
You must connect to the database using Database Authentication.
See Users and Credential Types for an overview of authentication options for Dynamics NAV.

Other Uses
You use the development environment to create and manage Dynamics NAV databases and to upload or change
Dynamics NAV licenses. However, you cannot use the Microsoft Dynamics NAV Development Environment to
administrate your solution. Instead, you use the Microsoft Dynamics NAV Server Administration tool or the
Dynamics NAV Windows PowerShell cmdlets.

See Also
Developing Extensions Using the New Development Environment - Preview
Microsoft Dynamics NAV Server Administration Tool
Administration in the Development Environment
Setting Database Owner and Security Administration Permissions
License Types
Breakpoints
Walkthrough: Debugging the Microsoft Dynamics NAV Windows Client
Working with Dynamics NAV Help Server
1/2/2018 • 2 min to read • Edit Online

Dynamics NAV Help deploys to a Dynamics NAV Help Server, which is a website that installs on the specified
server. The website includes Search and other navigation, and it provides context-sensitive Help for Microsoft
Dynamics NAV Web client in addition to Microsoft Dynamics NAV Windows client. Depending on your
deployment architecture, you can choose to set up a dedicated Help Server that all clients connect to, or you can
choose to deploy customer-specific Help Servers.

Accessing Dynamics NAV Help


When you have deployed a Dynamics NAV Help Server, users in the Microsoft Dynamics NAV Windows client
and Microsoft Dynamics NAV Web client can access Help by pressing F1 or choosing a Help icon.

TIP
In the Microsoft Dynamics NAV Web client, if you want to access context-sensitive Help for a field, for example, choose the
caption of the field. This is equivalent to pressing F1 in the Microsoft Dynamics NAV Windows client.

If you want to access the Dynamics NAV Help in a browser, enter the address for the Help Server, such as
http://MyServer:49000/main.aspx?lang=en&content=conGettingStarted.htm. You can save the URL as a favorite
in your browser, and you can save links to individual Help topics such as http://MyServer:49000/Main.aspx?
lang=en&content=conWorkingWithNav.htm.
For example, if there is a complicated task that you have to do periodically, you can find the topic that describes
how to do that task, and you can save the URL to the topic to your desktop or your favorites.
The URL to a Help topic contains two query parameters as described in the following table.

NAME DESCRIPTION EXAMPLE

lang Specifies the locale. da-dk

Dynamics NAV defaults to the Help


content in the non-locale-specific
version if the client locale cannot be
found.

content Specifies the HTML file that contains the conGettingStarted.htm


relevant Help content.

In the standard Help, most Help topics have easily recognizable file names, such as conGettingStarted.htm for the
conceptual overview that is called Getting Started. Similarly, the Help content for field 1 on table 3 is in the
T_3_1.htm file.
In the standard Help for Dynamics NAV, many file names for topics have a prefix that identifies the type of content
that the topic contains. The following table describes the prefixes for file names.

NAME DESCRIPTION

con The topic contains a conceptual overview.


NAME DESCRIPTION

B_ The topic contains reference content for a batch job.

N_ The topic contains reference content for a page.

ori The topic is an orientation topic that provides an overview of


a group of topics.

R_ The topic contains reference content for a report.

ref The topic contains reference content for the Microsoft


Dynamics NAV Development Environment.

S_ The topic contains reference content for a system window or


dialog.

T_ The topic contains reference content for a table or a field on a


table.

tsk The topic is a task topic and contains procedures.

wlk The topic contains a walkthrough.

See Also
Configuring Microsoft Dynamics NAV Help Server
Upgrading Your Existing Help Content
Help Table of Contents
Finding Information in Help
Product and Architecture Overview
Additional Components
1/2/2018 • 1 min to read • Edit Online

The components listed in this section extend the capabilities Microsoft Dynamics NAV 2018 in various ways.

Components
The following components can also be installed with Microsoft Dynamics NAV 2018 Setup:
Automated Data Capture System
Microsoft Office Outlook Add-In
Microsoft Dynamics NAV Web Client
Microsoft Dynamics NAV Help Server
Deploying Microsoft Dynamics NAV Using ClickOnce

See Also
Working with Microsoft Dynamics NAV Setup
Multitenant Deployment Architecture
1/2/2018 • 6 min to read • Edit Online

Dynamics NAV supports deployments where several different companies access a centrally maintained Dynamics
NAV application. By using this multitenancy support, you can add new customers to your solution easily, and you
can roll out updates quickly with limited downtime for your customers.

IMPORTANT
You do not have to turn your Dynamics NAV solution into a multitenant deployment. You can install and run Dynamics NAV
as a classic one-server-one-database deployment.

In a multitenant deployment, information about the Dynamics NAV application is stored in a separate application
database. Your customers’ data is stored in separate business databases, each of which is a tenant in your
deployment. By separating application from data, you can deploy the same solution to many customers with
centralized maintenance of the application and isolation of each tenant. The application database contains the
tables that define an application, such as the Object table and other system tables.
For example, if your current solution contains 10 companies in the Dynamics NAV database, you can choose to
create separate Dynamics NAV databases to store each company’s business data. The knowledge about the
shared application is then stored in a dedicated application database. Dynamics NAV includes Windows
PowerShell cmdlets that create an application database, and other cmdlets that enable you to create and
administer tenant-specific databases.
You can choose to upgrade to Dynamics NAV and not change your deployment so that you still have a single
database that has one or more companies in it. You can also choose to extract the application tables to an
application database but still have one business data database that has one or more companies in it. In both
scenarios you have not migrated to multitenancy, but in the second scenario you have prepared your solution so
that you can move to multitenancy at a later point.

Tenants, Companies, and Databases


A tenant is an entity that uses your solution and stores data in a business database. This is often either a business
or a group of legal entities whose data can be stored in one database. In practical terms, a tenant is a database that
stores business data for one or more Dynamics NAV companies. Each tenant is connected to a Microsoft
Dynamics NAV Server instance, but the Microsoft Dynamics NAV Server instance can support multiple tenants.
When you deploy and maintain a Microsoft Dynamics NAV 2018 solution, you must activate the relationship
between the Microsoft Dynamics NAV Server instance by mounting the tenant to the Microsoft Dynamics NAV
Server instance. You can do this by using the Microsoft Dynamics NAV Server Administration tool or by running
the Mount-NAVTenant and Sync-NAVTenant cmdlets from the Microsoft Dynamics NAV Administration
Shell. Similarly, to disconnect a tenant, you can use the Microsoft Dynamics NAV Server Administration tool or
run the Dismount-NAVTenant cmdlet. For more information, see How to: Mount or Dismount a Tenant on a
Microsoft Dynamics Server Instance.
When tenants are mounted, the tenant configurations are stored in the dbo.$ndo$tenants table of the
application database that is connected to the Microsoft Dynamics NAV Server instance. If you connect additional
Microsoft Dynamics NAV Server instances to the same application database, the added server instances will
automatically inherit the tenant configurations from the application database. This means that existing tenants will
be automatically mounted to the new server instance. In addition, if you must mount or dismount a tenant, you
only have to perform the operation on one of the Microsoft Dynamics NAV Server instances. The other server
instances will automatically detect and update to the changes.
When you refer to a tenant, you refer to it by the tenant ID. The first tenant that is mounted against a Microsoft
Dynamics NAV Server instance has the tenant ID default. However, you can choose to set up host names for the
tenants in your deployment. For example, if you want a tenant to access Dynamics NAV through a URL, you can
set up a tenant-specific subdomain. The users in that tenant will then access Dynamics NAV through a URL such
as https://mytenant.myservice.com. The tenant host name, mytenant.myservice.com, must be specified as an
alternative ID in the tenant configuration. You can specify alternative IDs for a tenant by using the Mount-
NAVTenant Windows PowerShell cmdlet.
Companies
A tenant database can contain one or more Dynamics NAV companies. It is not the number of companies in a
database that determines whether you are running a multitenant environment. The deciding factor is whether you
have created an application database, and if you have more than one tenant database connected to the application
database.
Databases
When information about the application is stored in a separate application database, you maintain the application
centrally without affecting the various tenants that use the application. Each tenant database contains the business
data for one or more specific companies and does not contain all of the application metadata.
For example, if you want to modify a report, and your solution is used by 25 customers, you modify the report in
the application database. When each customer then accesses the report, they see the modified report.
Deployment Scenarios Supported in Microsoft Dynamics NAV 2018
The following table compares deployment scenarios.

INCLUDES APPLICATION NO. OF BUSINESS DATABASES NO. OF COMPANIES IN


DATABASE PER APPLICATION DATABASE BUSINESS DATABASE MULTITENANT DEPLOYMENT

No 1 1 No

Yes 1 1 No

Yes 2 2 Yes

Yes 2 1 Yes

Yes 2 2 Yes

In the table, the number of companies and business databases are shown as either 1 or 2. But most of the time
there are either 1 or more than 2.
The table describes different deployments of a Dynamics NAV solution. For example, a deployment with one
database and a single company versus a deployment with two or more business databases for each application
database. Of those two scenarios, only the second is a multitenant deployment because it connects multiple tenant
databases (the business databases) with a single application database. The table also illustrates that you can have
multiple companies in a business database. Finally, you can have an application database and a single business
database that contains multiple companies. This is a single-tenant deployment.

The Application in Multitenant Deployments


In a Dynamics NAV application that is used in a multitenant deployment, some areas require you to set up web
services. Since web services are created in the application database, you must create at least one tenant that has
write access to the application database. This setting is determined by the Allow application database writes
parameter when you mount a tenant against a Microsoft Dynamics NAV Server instance. For more information,
see How to: Mount or Dismount a Tenant on a Microsoft Dynamics Server Instance.
For example, you can create a dedicated administration tenant that you mount against the Microsoft Dynamics
NAV Server instance when you create web services for an application.
If you have an existing Dynamics NAV application that you want to use in a multitenant deployment, there are a
number of changes that you have to make. This includes setting up the permission sets in a way that supports all
tenants that use that application.
URLs and Tenants
In multitenant deployments, URLs must specify the tenant that the URL applies to. If you have C/AL code that
constructs URLs, you must update the code to include the tenant. Alternatively, update your code with the
GETURL Function to get the URLs calculated for you. The same applies to hyperlinks in report objects, for
example.
The URL can specify the tenant ID or the tenant host name if you specify host names as alternative IDs for
tenants. For example, the following URL consumes the Customer ODATA web service for a specific tenant:

http://localhost:7048/DynamicsNAV/OData/Company('CRONUS-International-Ltd.')/Customer?Tenant=Tenant1

If the mytenant.myservice.com host name has been specified as an alternative ID for the tenant Tenant1, then the
following URL returns the same ODATA web service:

http://mytenant.myservice.com:7048/DynamicsNAV/OData/Company('CRONUS-International-Ltd.')/Customer

See Also
Migrating to Multitenancy
Upgrading to Microsoft Dynamics NAV 2017
Microsoft Dynamics NAV Windows PowerShell Cmdlets
How to: Mount or Dismount a Tenant on a Microsoft Dynamics Server Instance
Accessibility
1/2/2018 • 1 min to read • Edit Online

This section contains information about the available accessibility features in Microsoft Dynamics NAV 2018. For
more information, see the following topics:
Accessibility Features of Microsoft Dynamics NAV Windows Client
Accessibility Features of Microsoft Dynamics NAV Web Client

See Also
Development
License Types
3/13/2018 • 3 min to read • Edit Online

When you create a user in Microsoft Dynamics NAV 2018, you must specify a license type. This topic provides an
overview of the license types.

NOTE
Licenses are specific to the Dynamics NAV version and are not forward or backward compatible. This means that a license
from an earlier Dynamics NAV version will not work with Microsoft Dynamics NAV 2018, and vice versa.

For additional information about the types of user licenses and the license restrictions regarding user licenses, see
the licensing guide that applies to your version of NAV. For more information, see the Microsoft Dynamics NAV
2018 landing page on PartnerSource (requires PartnerSource login).
Full User
Full User licenses provide users full read and full write capabilities to all of the licensed solution functionality
through any and all modes of access, including the Microsoft Dynamics NAV Windows client, the Microsoft
Dynamics NAV Web client, or any other mode of access including web services. Full User licenses are for
users requiring unlimited read and write access. As long as the number of users needing simultaneous
access to the solution does not exceed the number of Full User licenses you have acquired, these users are
properly licensed for full read and write access to the complete solution functionality.
Limited User
Limited User licenses provide users full read, but limited write, capabilities to all of the licensed solution
functionality through any and all modes of access including the Microsoft Dynamics NAV Windows client.
The Limited User license is designed to give customers a lower-cost alternative for extending ERP to users
who only require limited access to the Dynamics NAV application:
Read access to data contained in the solution through any client accessing the application, including
but not limited to the Microsoft Dynamics NAV Windows client, the Microsoft Dynamics NAV Web
client, and web services.
Write access to a maximum of three application tables in the object range 0 – 99,999,999 other than
the General Ledger Entry table, through any client accessing the application. Access to the General
Ledger Entry Table requires a Full User license.
For more information, see the latest version of the Dynamics NAV Licensing Guide.
Device Only User
Device-only licenses enable a user to connect, provided there is an enabled device available to use. Devices
can be full or limited. Device users have either full or limited access, as determined by the device.
Windows Group
Use this license type to create a Dynamics NAV user account that is based on a Windows group and has
explicit permissions in Dynamics NAV. Individual members of the Windows group will then inherit the
permissions for this user.
IMPORTANT
For each member of the Windows group, you create a Dynamics NAV user account, which does not explicitly have
any permissions. Users then log on by using their Dynamics NAV user account credentials.

Windows Group licensing is a form of license multiplexing. Multiplexing does not reduce the number of
user licenses required to access a Dynamics NAV solution.
External User
As described in the Microsoft Software License Terms that apply to Microsoft Dynamics NAV 2018, external
users are the customers of customers. This license type is specific to individual users of Microsoft Dynamics
NAV 2018. External user licenses must not be shared with other individual users. You do not need
concurrent user CALs for external users. External users must not use any clients provided by the Microsoft
Dynamics NAV 2018 Application Programming Interface (API), such as the Microsoft Dynamics NAV
Windows client or the Microsoft Dynamics NAV Web client. External user licenses must not be used for
business process outsourcing purposes.

See Also
How to: Specify When UI Elements Are Removed
Properties of the Demo License
How to: Upload the License File
Microsoft Dynamics NAV 2018 Licensing Guide(requires PartnerSource login)
Deployment
1/2/2018 • 1 min to read • Edit Online

The topics in the Deployment node are intended to help an administrator install and configure Microsoft
Dynamics NAV 2018 software.

Key Features of Setup


With Microsoft Dynamics NAV 2018 Setup, you can:
Install different components on different computers.
Choose from a selection of predefined Installation Options or create your own custom list of components
and options to install. For more information, see How to: Choose Components to Install.
Preconfigure components before installation. For more information, see How to: Preconfigure
Components.
Create, save, or load Setup configuration files that capture your selection of components and configuration
information. For more information, see How to: Create or Load a Setup Configuration File.
You use Setup to install software and to create custom deployments that you can distribute to different
users across a company.

Installation Notes
Before installing Microsoft Dynamics NAV 2018 components on a computer, you must remove (uninstall)
any previous versions.
All RoleTailored components must be from the same version and build of Dynamics NAV for the software
to run correctly.
If you have either SQL Server 2000 or Microsoft SQL Server Desktop Engine (MSDE ) installed on a
computer where you want to install Dynamics NAV, then you must remove it before you begin installing.
The presence of either of these database products causes a Setup error.

See Also
Product and Architecture Overview
Installation Options
System Requirements for Microsoft Dynamics NAV
Working with Microsoft Dynamics NAV Setup
Configuring Microsoft Dynamics NAV
Installation Options
1/2/2018 • 1 min to read • Edit Online

When you run Microsoft Dynamics NAV 2018 Setup, you can select from a list of predefined installation options,
which are logical collections of Dynamics NAV components.
Review and accept the Microsoft Software License Terms in Setup and then choose Next. On the next page, you
are presented with two options: Install Demo and Choose an installation option. Choose the latter option to
see the other available installation options.

In This Section
Demo Option
Client Option
Server Option
Developer Option
Custom Option

Related Sections
System Requirements for Microsoft Dynamics NAV
Working with Microsoft Dynamics NAV Setup
Provisioning the Microsoft Dynamics NAV Server
Account
1/2/2018 • 10 min to read • Edit Online

The Microsoft Dynamics NAV Server account is used by Dynamics NAV clients to log on to the Microsoft
Dynamics NAV Server instance. The Microsoft Dynamics NAV Server then uses the service account to log on to
the Dynamics NAV database. When you install Microsoft Dynamics NAV Server, you identify an Active Directory
account to provide credentials for the server. By default, Setup runs Microsoft Dynamics NAV Server under the
Network Service account, a predefined local account used by the service control manager. This account has
minimum privileges on the local computer and acts as the computer on the network.
We recommend that you create a domain user account for running Microsoft Dynamics NAV Server. The Network
Service account is considered less secure because it is a shared account that can be used by other unrelated
network services. Any users who have rights to this account have rights to all services that are running on this
account. If you create a domain user account to run Microsoft Dynamics NAV Server, you can use the same
account to run SQL Server, whether or not SQL Server is on the same computer.

NOTE
Because Dynamics NAV Setup and the New-NavDatabase cmdlet configure the required permissions for the Microsoft
Dynamics NAV Server account, you will typically use the procedures in this topic when you change the Microsoft Dynamics
NAV Server account for an existing installation.

To provision a Microsoft Dynamics NAV Server account, complete the following procedures as described in this
topic:
Provisioning a Domain User Account
Provisioning the Network Service Account

Prerequisite
Delete the Microsoft Dynamics NAV folder in the ProgramData folder of your system drive, for example,
C:\ProgramData\Microsoft\Microsoft Dynamics NAV .

The ProgramData is folder is typically hidden, so you might have to change the folder options for your system
drive to show hidden files, folders, and drives.

Provisioning a Domain User Account


If you are running the Microsoft Dynamics NAV Server under a domain user account, you must:
Enable the account to log in as a service
Enable the account to register an SPN on itself
Add the account to the SMSvcHost.exe.config file
Give the account necessary database privileges in SQL Server
Enabling the account to log in as a service
Depending on various factors, the account may or may not already have this ability. For example, if you have
already installed SQL Server and configured it to run under the same account, SQL Server will have modified the
account to log in as a service.
Instructions for enabling an account to log in as a service are available on TechNet. See Add the Log on as a
service Right to an Account. The instructions are for Windows Server 2008. For Windows 7, use this version of the
procedure: Add the Log on as a service right to an account.
When this permission is lacking, Microsoft Dynamics NAV Server server instances may not be able to start.
Enabling the account to register an SPN on itself
To enable secure mutual authentication between clients and Microsoft Dynamics NAV Server, you must configure
the Microsoft Dynamics NAV Server account to self-register Service Principal Names (SPNs). Mutual
authentication is recommended in a production environment but may not be necessary in a testing or staging
environment. The following procedure assumes a computer running Windows Server 2008 or Windows Server
2008 R2. On Windows 7 or Windows Vista you would need to install the Remote Server Administration Tools first.
To e n a b l e t h e M i c r o so ft D y n a m i c s N A V Se r v e r a c c o u n t t o r e g i st e r a n SP N o n i t se l f

1. Start the Active Directory Users and Computers snap-in in Microsoft Management Console (MMC ):
a. Choose Run on the Start menu, type mmc on the command line, and the choose OK.
b. When the console opens, select Add/Remove Snap-In from the File menu, select Active Directory
Users and Computers, and choose Add.
If you do not see Active Directory Users and Computers in the list of available snap-ins, you may
need to use Server Manager to install the Active Directory Domain Services role on your server
computer.
2. In MMC, select Active Directory Users and Computers in the tree view and choose Advanced Features
from the View menu.
3. Expand the domain node in the tree view and choose Users.
4. Right-click the service account, select Properties, and then choose to display the Security tab.
5. Choose SELF in the Group or user names list.
6. Under Permissions for SELF, in the lower part of the panel, scroll down to Write public information and
select the Allow column.
7. Choose OK to exit the Properties panel, and close Active Directory Users and Computers.
Add the account to the SMSvcHost.exe.config file
Dynamics NAV uses Net.TCP Port Sharing Service, which is managed by SMSvcHost.exe. The
SMSvcHost.exe.config contains information about the identities (or accounts) that can use the service. These
accounts are specified as security identifiers (SIDs) in the section of the SMSvcHost.exe.config file. By default,
permission is implicitly granted to system accounts, such as NetworkService. For other accounts, you must
explicitly add the SID for the account to the SMSvcHost.exe.config file as follows:
1. Get the SID of the user account.
The SID is an alphanumeric character string, such as S -1-5-20 or S -1-5-32-544. There are different ways to
get the SID, such using Windows Management Instrumentation Control Command-line (WMIC ) or the
computer's registry.
To use WMIC, open a command prompt, and run the following command:
wmic useraccount get name,sid

This will display a list of user accounts and their SIDs.


To use the registry, run regedit, and then go to the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList folder.
This folder list the SIDs for each user account. To find the SID that corresponds to the user account
that you want, look at the ProfileImagePath key data.
2. Using a text editor, open the SMSvcHost.exe.config file.
You will find the SMSvcHost.exe.config file in the installation folder for the latest :NET Framework version
on the Microsoft Dynamics NAV Server computer; for example,
C:\Windows\Microsoft.NET\Framework\v4.0.30319 .

3. Add the SID to the element as follows, and then save the file:

<system.serviceModel.activation>
<net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2"
receiveTimeout="00:00:10" teredoEnabled="false">
<allowAccounts>
// Your NAV Server account
<add securityIdentifier="N-N-N-N"/>
</allowAccounts>
</net.tcp>

For more information about SMSvcHost.exe and the SMSvcHost.exe.config file, see Configuring the Net.TCP Port
Sharing Service.
Giving the account necessary database privileges in SQL Server
The Microsoft Dynamics NAV Server account needs two privileges on SQL Server instance used for Dynamics
NAV:
1. in order to be able to create databases on the instance, it must have the dbcreator server-level role. This
privilege is only needed during database creation.
2. in order to be able to serve client requests and read/write to the Dynamics NAV database, it must be
member of the db_owner database role on the Dynamics NAV database.
When you install the Dynamics NAV database by using Dynamics NAV Setup or the New -NAVDatabase
PowerShell cmdlet, you can specify the Microsoft Dynamics NAV Server account. In these cases, the server
account that you specify should already have the necessary privileges in SQL Server. If you change the Microsoft
Dynamics NAV Server account for an existing installation, then you should verify the account has the required
privileges in SQL Server.
To verify server-level and database-level privileges on SQL Server after you create your Dynamics NAV database,
use SQL Server Management Studio and, if necessary, modify privileges. If you have installed SQL Server with the
guidelines in Installation Considerations for Microsoft SQL Server, then SQL Server Management Studio is
already installed on your computer. Otherwise, update your SQL Server installation to include the Management
Tools - Complete option for SQL Server (for SQL Server 2012/2014.) For SQL Server 2016, SQL Server
Management Studio can be downloaded and installed as a standalone application.
To a ssi g n n e c e ssa r y SQ L Se r v e r p r i v i l e g e s fo r t h e M i c r o so ft D y n a m i c s N A V Se r v e r a c c o u n t

1. Start SQL Server Management Studio and connect to the instance where the Dynamics NAV database is
installed.
2. Create a login for the Microsoft Dynamics NAV Server account.
a. Navigate the tree view: Security, Logins.
b. Right-click Logins and choose New Login.
c. Choose Search, and use the Select User or Group dialog box to identify the Microsoft Dynamics
NAV Server account.
d. Choose OK to exit the New Login dialog box.
3. (optional) Grant the login Alter any event session and View server state permissions.
This step is only required if you want to log SQL Server deadlocks in the Windows Event log for the
Microsoft Dynamics NAV Server intance. For more information, see Monitoring SQL Database Deadlocks.
a. Navigate the tree view: Security, Logins.
b. Right-click the login that you created, and then choose Properties.
c. Under Select a page, choose Securables.
d. On the Explicit tab, select the Alter any event session and View server state check boxes in the
Grant column.
e. Choose OK.
4. Grant the login the server-level role dbcreator
a. Navigate the tree view: Security, Logins.
b. Right-click the Microsoft Dynamics NAV Server account, and then choose Properties.
c. Click on Server Roles.
d. Check the dbcreator box.
e. Choose OK.
5. Add the login as a user on the master database.
a. Navigate the tree view: Databases, System Databases, master, Security, Users.
b. Right-click Users and choose New User.
c. Choose the ellipse button at the far right of the second line in the Database User – New dialog box.
d. In the Select Login dialog box, enter or browse for the login you created for the Microsoft Dynamics
NAV Server account.
e. Enter a name in the User name field (the first line in the Database User - New dialog box).
f. Choose OK to exit the Database User - New dialog box.
6. Grant the Microsoft Dynamics NAV Server login permissions on the master database. In the tree view,
right-click master and choose Properties. Then do the following in the Database Properties – master
dialog box.
a. Under Select a Page, choose Permissions.
b. Under Name, choose the login you created for the Microsoft Dynamics NAV Server account name.
c. Under Permissions for <username>, on the Explicit tab, scroll down to down to the Select line,
and select the check box in the Grant column.
d. Choose OK to exit the Database Properties – master dialog box.
e. Navigate the tree view: Databases, System Databases, master, Tables, System Tables.
f. Right-click the dbo.$ndo$srvproperty table and choose Properties.
g. Under Select a Page, choose Permissions.
h. Choose Search, and use the Select User or Group dialog box to identify the login for the Microsoft
Dynamics NAV Server account.
i. Under Permissions for <username>, on the Explicit tab, scroll down to down to the Select line,
and select the check box in the Grant column.
j. Choose OK to exit the Table Properties – dbo.$ndo$srvproperty dialog box.
7. Grant the login the necessary database roles on the Dynamics NAV database.
a. Navigate the tree view: Databases, <your Microsoft Dynamics NAV database>, Security, Users.
b. Right-click Users and choose New User.
c. In the Database User – New dialog box, choose the ellipse button at the far right of the second line.
d. Select the login you created for the Microsoft Dynamics NAV Server account name and choose OK.
e. Under Database role membership, select the db_owner check box.
f. Choose OK to exit the Database User – New dialog box.
g. Right-click your Dynamics NAV database and choose Properties.
h. Under Select a Page, choose Permissions.
i. Choose Search, and use the Select User or Group dialog box to identify login you created for the
Microsoft Dynamics NAV Server account.
j. Under Permissions for <username>, on the Explicit tab, scroll down to down to the View
database state line, and select the check box in the Grant column.
k. Choose OK to exit the Database Properties dialog box for your Dynamics NAV database.
Alternatively, you can script these steps in SQL Server Management Studio, as shown in the following example:

USE [master]
GO
CREATE LOGIN [domain\accountname] FROM WINDOWS
CREATE USER [domain\accountname] FOR LOGIN [domain\accountname]
GRANT SELECT ON [master].[dbo].[$ndo$srvproperty] TO [domain\accountname]
ALTER SERVER ROLE [dbcreator] ADD MEMBER [domain\accountname]

GO
USE [Microsoft Dynamics NAV Database]
GO
CREATE USER [domain\accountname] FOR LOGIN [domain\accountname]
ALTER ROLE [db_owner] ADD MEMBER [domain\accountname]
GRANT VIEW DATABASE STATE TO [domain\accountname]

GRANT VIEW SERVER STATE TO [domain\accountname]


GRANT ALTER ANY EVENT SESSION TO [domain\accountname]

Provisioning the Network Service Account


The only circumstance where it is necessary to take any action with regard to the Network Service account is when
change the Microsoft Dynamics NAV Server account on an existing installation from a domain account to the
Network Service. In this situation you must verify that the account has the necessary database privileges in SQL
Server, as per Giving the account necessary database privileges in SQL Server, above.
Installation Considerations for Microsoft SQL Server
and Microsoft Dynamics NAV
4/26/2018 • 6 min to read • Edit Online

This topic describes the requirements for installing and configuring Microsoft SQL Server to work with Microsoft
Dynamics NAV 2018.
Dynamics NAV can run on Microsoft SQL Server and Microsoft Azure SQL Database. For a list of supported
editions of SQL Server, see Microsoft Dynamics NAV Database Components for SQL Server Requirements.

Using Microsoft SQL Server


Storage
Use different disks or disk partitions for the following:
Windows operating system.
Data files for the system databases.
Log files for system and user databases.
Data and log files for the TempDB database.
For optimal read/write performance, make sure that disks that are used for SQL Server data files are formatted
using 64 KB block size.
Virus scanning
To help you decide which kind of antivirus software to use on the computers that are running Microsoft SQL
Server in your environment, see How to choose antivirus software to run on computers that are running SQL
Server.
Memory
For optimal read performance, maximize the available memory on the server according to the version and edition
of SQL Server used. Refer to the SQL Server documentation for maximum values.
SQL Server Components
If you are installing Microsoft SQL Server for use with Dynamics NAV, then install the following components:
Database Engine Services
Client Tools Connectivity
Management Tools - Complete
Setup Options for Microsoft SQL Server
When you are running Microsoft SQL Server Setup, you must provide additional information. Your responses can
affect how you use SQL Server with Dynamics NAV.
TempDB database configuration
For servers with less than 8 cores, create as many data files for the TempDB database as the number of cores. For
servers with more than 8 cores, start with 8 data files, and increment with 4 files at a time, if needed.
Make sure that all data files for the TempDB database are of the same size.
Consider putting data and log files for TempDB on a local SSD drive if you are using SAN storage.
Data file and log file configuration
Auto-growth of the database and/or transaction log files in production can degrade performance as all transaction
must queue up and wait for SQL Server to grow the file before it can begin to process transactions again. This can
create bottlenecks. We strongly recommend growing data and log files during off-peak periods and by 10% to
25% of the current size. We do not recommend disabling “Auto-Grow”, as in an emergency it is still better to have
SQL Server to auto-grow files than to run out of disk space and bring the database down.
Max degree of parallelism (MAXDOP)
The SQL queries generated by Dynamics NAV is of OLTP type (many, small transactions). It is therefore
recommended to run Dynamics NAV with MAXDOP set to the value 1.
On SQL Server 2014, MAXDOP can only be set on the instance level, changing an advanced server configuration
option. On SQL Server 2016, MAXDOP can be set on the database level, changing a database scoped configuration.
Both advanced server configuration options and database scoped configurations can be set by using SQL Server
Management Studio, see the SQL Server documentation for details.

NOTE If you are running SQL Server Enterprise Edition, index maintenance can be done in parallel. If you run
maintenance jobs to do this work in off-peak hours, you might want to set MAXDOP back to 0 while running
these jobs. On SQL Server 2016, it is possible to set MAXDOP directly in the Rebuild Index Task wizard.

Instance Configuration
If you plan on installing the Dynamics NAV Demo database, and you want Dynamics NAV Setup to use an already
installed version of SQL Server (and not to install SQL Server Express), you must create a SQL Server instance
named NAVDEMO in SQL Server before you run Setup. Otherwise, Setup will install SQL Server Express
automatically, even if there is a valid version of SQL Server already on the computer. If you do not plan to install
the Demo database, or if you have no objection to using SQL Server Express, you are free to use the default
instance and Instance ID on the Instance Configuration page, or to specify any instance name.
Database Engine Service
Each SQL Server instance is run by its own windows service. The following two things are important to configure
for these services
Startup Options
Enable trace flags 1117 and 1118 as startup options for SQL Server 2014. For SQL Server 2016, these trace flags
are enabled by default.
Startup options can be set by using SQL Server Configuration Manager, see the SQL Server documentation for
details.
Service account
We recommend that you use dedicated domain user accounts for the Windows services running your Microsoft
Dynamics NAV Server instances and your SQL Server instances, instead of a Local System account or the
Network Service account.
The Microsoft Dynamics NAV Server account must have privileges on the SQL Server instances and on the
Dynamics NAV database(s). See Provisioning the Microsoft Dynamics NAV Server Account for details.
For installations on SQL Server 2014, consider adding the service account for then SQL Server engine to the
Perform Volume Maintenance Tasks security policy. For SQL Server 2016, it is possible to do this from the
installer.
Database configurations
After Dynamics NAV has been installed, it is important to check a few settings on the Dynamics NAV database(s).
This is especially important for databases, which have been upgraded from previous versions of SQL Server.
Statistics
The databases used by Dynamics NAV should have set the options AUTO_CREATE_STATISTICS and
AUTO_UPDATE_STATISTICS to the value ON (this is the default behavior and should not be changed)
SQL Server (2014 and earlier) uses a threshold based on the percent of rows changed before triggering an update
of the statistics for a table regardless of the number of rows in the table. It is possible to change this behaviour by
setting trace flag 2371 as a startup option for the instance. See Knowledge Base article ID 2754171,
https://support.microsoft.com/en-gb/help/2754171/controlling-autostat-auto-update-statistics-behavior-in-sql-
server for more information about when to set this trace flag.
SQL Server (starting with 2016 and under the compatibility level 130) uses a threshold that adjusts according to
the number of rows in the table. With this change, statistics on large tables will be updated more often.
Even with "Auto Update Statistics" enabled, we still strongly recommend running a periodic SQL Agent job to
update statistics. This is because "Auto Update Statistics" will only be triggered according to the rules described
above. On large tables with tens of millions of records (such as Value Entry, Item Ledger Entry and G/L Entry), a
small percentage of data in a given statistic such as [Entry No.] can change and have a material effect on the
overall data distribution in that statistic. This can cause inefficient query plans, resulting in degraded query
performance until any threshold is reached. We recommend using the T-SQL procedure "sp_updatestats" to
update statistics, as it will only update statistics where data has been changed. We recommend creating a SQL
Agent Job that runs daily or weekly (depending on transaction volume) during off-peak hours to update all
statistics where data has changed.
Other database options
We recommend to set the database option PAGE_VERIFY to the value CHECKSUM for all databases (including
TEMPDB ) as this is the most robust method of detecting physical database corruption. This is the default setting
for new installations.
Backup
Do remember to setup backup of both system and user databases. Remember also to test restore procedures
regularly.

Using Microsoft Azure SQL Database


You can deploy a Dynamics NAV database to Azure SQL Database. Azure SQL Database is a cloud service that
provides data storage as a part of the Azure Services Platform.
To optimize performance, we recommend that the Microsoft Dynamics NAV Server instance that connects to the
database is also deployed on a virtual machine in Azure. Additionally, the virtual machine and SQL Database must
be in the same Azure region.
For development and maintenance work on Dynamics NAV applications, if the Microsoft Dynamics NAV
Development Environment is installed on the same virtual machine in Azure as the Microsoft Dynamics NAV
Server, then you can connect to the Azure SQL database from the development environment.
For more information, see How to: Deploy a Microsoft Dynamics NAV Database to Azure SQL Database.

See Also
Data Access
Configuring Microsoft SQL Server
Troubleshooting: SQL Server Connection Problems
Deployment
Enhancing Microsoft Dynamics NAV Server Security
Working with Microsoft Dynamics NAV Setup
1/2/2018 • 1 min to read • Edit Online

NOTE
Before installing Microsoft Dynamics NAV 2018, you must uninstall any prior version of Dynamics NAV.

Key Concepts for Microsoft Dynamics NAV 2018 Setup


Before you install Dynamics NAV, you should understand the following concepts about Setup.
Installation Options
Microsoft Dynamics NAV 2018 Setup offers installation options that are designed for a typical use or type of user.
For more information, see Installation Options.
Setup Configuration Files
In addition to using Setup to actually install software, you can use it to capture a set of Setup decisions to a Setup
configuration file which you can then save and distribute. When you load a Setup configuration file with
Dynamics NAV Setup, previously saved options and configurations are applied.
Required Security Configuration
After you install Dynamics NAV, you must then set up security. For more information, see Security Overview.

In This Section
How to: Run Setup
Microsoft Software License Terms
Install Demo or Choose an Installation Option
How to: Choose Components to Install
How to: Preconfigure Components
How to: Create or Load a Setup Configuration File
Modifying, Uninstalling, or Repairing Microsoft Dynamics NAV
Running Setup on the Command Line
How to: Install C/SIDE Development Environment
How to: Upload the License File
Installation and Configuration Walkthroughs

Related Sections
Configuring Microsoft Dynamics NAV
Security Overview
System Requirements for Microsoft Dynamics NAV
Deploying the Microsoft Dynamics NAV Web and
Mobile Clients
5/14/2018 • 5 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
Giving users the capability to access to data by using the Microsoft Dynamics NAV Web client, Microsoft
Dynamics NAV Tablet client, Microsoft Dynamics NAV Phone client, and Outlook add-in requires a Internet
Information Services (IIS ) web site as part of your deployment. The website, which we refer to as Dynamics NAV
Web Server instance, hosts the files that provide content and services to client users over the Internet. This article
highlights several factors to consider to help you set up Dynamics NAV Web Server instances that suit your
deployment requirements.
If you just want to get started installing the Microsoft Dynamics NAV Web Server components, see How to: Install
the Web Server Components.

ASP .NET Core on IIS


Dynamics NAV Web Server instances run on ASP.NET Core on IIS, which in part dictates the directory structure
of the instances. For more information about ASP .NET Core, see Introduction to ASP.NET Core.

Network Topology
The following illustration shows the component infrastructure that supports Dynamics NAV Web Server instances
on your network.

Each Dynamics NAV Web Server instance must connect to a Microsoft Dynamics NAV Server, which in turn
connects to the database that contains the application and business data. Multiple Dynamics NAV Web Server
instances can connect to the same Microsoft Dynamics NAV Server. You can deploy these components on one
computer or on separate computers. For example, you can install the Dynamics NAV Web Server instance on one
computer and the Microsoft Dynamics NAV Server and SQL Server database on another computer. The topology
that you choose depends on the network resources and the infrastructure of the Dynamics NAV components. The
installation and configuration process is different for each scenario.
For information about the common deployment scenarios, see Deployment Scenarios for the Microsoft Dynamics
NAV Web Server Components.

IMPORTANT
The Dynamics NAV mobile app is not supported in a deployment scenario that uses Azure Active Directory Application
Proxy.
Creating a Dynamics NAV Web Server instance
There are two ways to create a Dynamics NAV Web Server instance. You can use the Microsoft Dynamics NAV
2018 Setup or the Dynamics NAV Web Server PowerShell cmdlets.
Using Microsoft Dynamics NAV 2018 Setup
Microsoft Dynamics NAV 2018 Setup is the quickest way to get a web server instance up and running, and is
typically how you install the first Dynamics NAV Web Server instance in your deployment.
Setup installs the Microsoft Dynamics NAV Web Server components, which does the following:
Installs and configure IIS with the required prerequisites, including Microsoft .NET Core - Windows
Server Hosting
Installs a web server instance on IIS.
Installs components and files in a WebPublish folder that enables you to add additional web server
instances without having to use the Microsoft Dynamics NAV 2018 installation media (DVD ).
You can only use Setup to install a single Dynamics NAV Web Server instance.
Setup does not let you choose the site deployment type for the web server instance. By default, it creates a
SubSite instance. For more information, see Site Deployment Types.
For information about how to install the Microsoft Dynamics NAV Web Server components, see How to:
Install the Web Server Components.
Using Dynamics NAV Web Server PowerShell cmdlets
There are several PowerShell cmdlets that enable you to create, configure, and remove Dynamics NAV Web
Server instances from a command line interface. To create a web server instance, you use the New -
NAVWebServerInstance cmdlet, which has the following advantages over Setup:
You can create multiple web server instances.
You have more flexibility regarding the site deployment type of the Dynamics NAV Web Server instances
on IIS. For example, you can create a root-level website instance or a subsite application instance under a
container website.

IMPORTANT
Using the the New-NAVWebServerInstance cmdlet requires that Microsoft .NET Core Windows Server Hosting is installed
and IIS is installed and configured with the prerequisites. So unless you have previously installed the Microsoft Dynamics
NAV Web Server components by using Setup, you will have to install and configure the prerequisites manually. For more
information about the prerequisites, see How to: Install and Configure Internet Information Services for Microsoft Dynamics
NAV Web Client.

For information about how to create a Dynamics NAV Web Server instance by using the New -
NAVWebServerInstance cmdlet, see Creating and Managing Dynamics NAV Web Server Instances Using
PowerShell.

Deployment Phases
Typically, you will deploy the Microsoft Dynamics NAV Web client in phases, which can influence the network
topology and security settings that you deploy. For example, in the development phase, you develop, test, and fine-
tune the application. In this phase, you might consider deploying the Microsoft Dynamics NAV Web client in a
single-computer scenario. When you move to the production phase, you deploy the Microsoft Dynamics NAV
Web client in the full network infrastructure.
Security
User Authentication
Dynamics NAV supports four methods for authenticating users who try to access the Microsoft Dynamics NAV
Web client: Windows, UserName, NavUserPassword, and AccessControlService. Windows authentication is
configured by default. For more information, see Users and Credential Types and How to: Configure
Authentication of Microsoft Dynamics NAV Web Client Users.
Service Account for Microsoft Dynamics NAV Server and Dynamics NAV Database Access
When you install Microsoft Dynamics NAV Server and Dynamics NAV database components, you must identify
an Active Directory account to provide credentials for the servers. By default, Microsoft Dynamics NAV 2018
Setup runs Microsoft Dynamics NAV Server and the Dynamics NAV database under the Network Service
account, a predefined local account that is used by the service control manager.

TIP
We recommend that you create and use a domain user account for running Microsoft Dynamics NAV Server and accessing
the Dynamics NAV database. The Network Service account is considered less secure because it is a shared account that can
be used by other unrelated network services.

For more information, see Provisioning the Microsoft Dynamics NAV Server Account.
Securing the Connection to Microsoft Dynamics NAV Web Client With SSL
You can help secure Dynamics NAV data that is transmitted over the Internet by enabling Secure Sockets Layer
(SSL ) on the connection to the Microsoft Dynamics NAV Web client. You can configure SSL when you install the
Microsoft Dynamics NAV Web Server components or after the installation.
For more information, see How to: Install the Web Server Components and How to: Configure SSL to Secure the
Connection to Microsoft Dynamics NAV Web Client.

See Also
Dynamics NAV Web Client
How to: Install the Web Server Components
How to: Install and Configure Internet Information Services for Microsoft Dynamics NAV Web Client
Configuring-the-Dynamics-NAV -Web-Server-and-Client.md
Deployment Scenarios for the Microsoft Dynamics
NAV Web Server Components
5/14/2018 • 1 min to read • Edit Online

This section describes how to install and configure the Microsoft Dynamics NAV Web Server components in
different network topologies.

Deployment Scenarios
The following table includes the deployment scenarios that are discussed in this section.

SCENARIO DESCRIPTION

Deploying the Microsoft Dynamics NAV Web Server Installs the Microsoft Dynamics NAV Web client, Microsoft
Components in a Demonstration Environment Dynamics NAV Tablet client, Microsoft Dynamics NAV
Windows client, Microsoft Dynamics NAV Development
Environment, and the CRONUS International Ltd.
demonstration database and company on a single computer.
The scenario lets you install and test the Microsoft Dynamics
NAV Web client features and behavior in a simple network
topology by using the default settings of Dynamics NAV
Setup. The installation requires minimal preparation and
hardware resources.

Deploying the Microsoft Dynamics NAV Web Server Installs the Microsoft Dynamics NAV Web Server components,
Components in a Single Computer Environment Microsoft Dynamics NAV Server, and the SQL Server database
components on the same computer.

Deploying the Microsoft Dynamics NAV Web Server Installs the Microsoft Dynamics NAV Web Server components
Components in a Two Computer Environment on a computer separate than Microsoft Dynamics NAV Server
and the SQL Server database components.

Deploying the Microsoft Dynamics NAV Web Server Installs the Microsoft Dynamics NAV Web Server components,
Components in a Three Computer Environment Microsoft Dynamics NAV Server, and the SQL Server database
components on three separate computers.

IMPORTANT
The Dynamics NAV mobile app is not supported in a deployment scenario that uses Azure Active Directory Application Proxy.

See Also
How to: Install the Web Server Components
How to: Install the Web Server Components using
Setup Wizard
5/14/2018 • 6 min to read • Edit Online

To deploy the Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Tablet client, you install the
Microsoft Dynamics NAV Web Server components on a computer that is running Internet Information Services
(IIS ). To access the Microsoft Dynamics NAV Web client, you must have a web browser and a network
connection to a Microsoft Dynamics NAV Server instance that connects to a Dynamics NAV database. The
following illustration shows the components involved in the setup.

You can install Microsoft Dynamics NAV Web Server components on the same computer as the Microsoft
Dynamics NAV Server or on a separate computer.

IMPORTANT
The Dynamics NAV mobile app is not supported in a deployment scenario that uses Azure Active Directory Application
Proxy.

TIP
You do not need a Microsoft Dynamics NAV Server instance or SQL Server database to install the Microsoft Dynamics NAV
Web Server components. You can install these components separately and then later configure the Microsoft Dynamics
NAV Web Server components to use them.

Prerequisites
Microsoft Dynamics NAV 2018 installation media. For example, this could be a DVD or network drive that
contains the Microsoft Dynamics NAV 2018 installation files.
Verify that the system requirements are met on the computer that you want to install Microsoft Dynamics
NAV Web Server components. For more information, see System Requirements for Microsoft Dynamics
NAV.
(Optional) Install Internet Information Services manually.
Dynamics NAV Setup can install and configure IIS. If IIS is already installed, then Setup will enable any
required features that are not currently enabled. If you want to install and configre IIS manually, see How
to: Install and Configure Internet Information Services for Microsoft Dynamics NAV Web Client.
(Optional) Get and install a certificate to configure SSL on the connection to Microsoft Dynamics NAV
Web clients.
You will have to import the certificate into the local computer store of the computer on which you will
install the Microsoft Dynamics NAV Web Server components, and then get the certificate's thumbprint,
which you will use during Setup.
If you do not want to configure SSL now, you can configure it after installation. For more information, see
How to: Configure SSL to Secure the Connection to Microsoft Dynamics NAV Web Client.

To install Microsoft Dynamics NAV Web Server components using the


Dynamics NAV Setup Wizard
1. On the computer that is running IIS, open the Microsoft Dynamics NAV 2018 installation media.
2. Double-click the setup.exe file to start the Dynamics NAV Setup Wizard.
If you have already installed one or more Dynamics NAV components on the computer, you will see the
Maintenance page instead of the Welcome page. In this case, choose Add or remove components,
and then go to step 7.
3. Choose the Next button.
4. To accept the license terms, choose I accept.
5. On the Dynamics NAV Setup page, choose Choose an installation option.
6. On the Choose an Installation Option page, choose Custom.
7. On the Customize the Installation page, select the Web Server Components, and then choose Run
from My Computer.
8. Choose the Next button to go to the Specify Parameters page.
9. In the Server section, set the following parameters to configure the Microsoft Dynamics NAV Server
instance.

PARAMETER DESCRIPTION

Server Name Specifies the name of the computer that is running


Microsoft Dynamics NAV Server for this client.

Client Services Port The listening TCP port for the computer that is running
Microsoft Dynamics NAV Server.

Service Name The name of the Microsoft Dynamics NAV Server instance
to connect to. Make a note of this name because it will be
part of the address for opening the Microsoft Dynamics
NAV Web client in a browser.

NOTE
If you currently do not know the Microsoft Dynamics NAV Server instance or you want set up the Microsoft
Dynamics NAV Server later, then use the default values.

10. In the Web Server Components section, set the Port parameter to the TCP port to use for the Microsoft
Dynamics NAV Web client website.
11. If you want to add an item on the Start menu for opening the Microsoft Dynamics NAV Web client, set
the Add link to Start menu parameter to Yes.
12. Set the Install IIS prerequisites parameter to one of the following values.

VALUE DESCRIPTION

Install Setup enables IIS and the required features for the
Microsoft Dynamics NAV Web client and installs the
Microsoft Dynamics NAV Web Server components. If IIS
is already enabled on the computer, then Setup enables
any required features that are not currently enabled.

Detect Setup detects whether IIS and the required features for
the Microsoft Dynamics NAV Web client are enabled on
the computer, and then does the following:

- If the required IIS features are enabled, then Setup


installs the Microsoft Dynamics NAV Web Server
components.
- If any IIS features are not enabled, then Setup does not
install the Microsoft Dynamics NAV Web Server
components and an error report is generated that lists
the required features. You must enable the required
features, and then run Setup again to install the
Microsoft Dynamics NAV Web Server components.

Skip Setup installs the Microsoft Dynamics NAV Web Server


components without detecting whether IIS or the
required features are enabled. Setup does not change the
IIS setup.

13. Verify the parameters, and then choose Apply to complete the installation.
14. When Setup is complete, choose the Close button.
A website called Microsoft Dynamics NAV 2018 Web Client is added on the IIS. The website includes a
web application that has the name DynamicsNAV110, which corresponds to the name of the Microsoft
Dynamics NAV Server instance used. The physical path of the web application is:
C:\inetpub\wwwroot\DynamicsNAV110.
The Microsoft Dynamics NAV Web Server components are also installed in the %systemroot%\Program
Files\Microsoft Dynamics NAV\110\Web Client folder of the computer.
For more information about the Microsoft Dynamics NAV Web client installation on IIS, see Deploying
the Microsoft Dynamics NAV Web Server Components.
15. If Microsoft Dynamics NAV Web Server components is installed on Windows 7, 8, or 8.1 create an
inbound rule in the Windows Firewall to allow communication on the TCP port that you chose during
Setup.
For more information, see How to: Create an Inbound Rule in Windows Firewall for the Port of Microsoft
Dynamics NAV Web Client.

To open the Microsoft Dynamics NAV Web client


From the computer on which you installed the Microsoft Dynamics NAV Web Server components, do one of the
following:
Choose Start, in the Search box, type Microsoft Dynamics NAV 2018 Web Client, and then choose the
related link
Open a web browser, and then in the address box, type:
http://localhost:port/ServiceName

Or for Microsoft Dynamics NAV 2017:


http://localhost:port/webclient

Replace port and ServiceName with that values that you chose during Setup. For example, the address
with the default installation is:
http://localhost:8080/DynamicsNAV110
For more information, see How to: Open the Microsoft Dynamics NAV Web Client. If you get an error when
trying to open the Microsoft Dynamics NAV Web client, see Troubleshooting the Microsoft Dynamics NAV Web
Client Installation for information about resolving the problem.

Next Steps
If the Microsoft Dynamics NAV Web Server components is installed on a different computer than
Microsoft Dynamics NAV Server, set up delegation on Microsoft Dynamics NAV Server from the
Microsoft Dynamics NAV Web client.
For more information, see How to: Configure Delegation for Microsoft Dynamics NAV Web Client.
If you want to change the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV
Web client connects to, then modify the configuration file for the Microsoft Dynamics NAV Web client
website.
For more information, see How to: Change the Microsoft Dynamics NAV Server for the Microsoft NAV
Web Client.
If you want to help secure the communication with the Microsoft Dynamics NAV Web client, configure
SSL.
For more information, see How to: Configure SSL to Secure the Connection to Microsoft Dynamics NAV
Web Client.

See Also
Deploying the Microsoft Dynamics NAV Web Server Components
Troubleshooting the Microsoft Dynamics NAV Web Client Installation
How to: Install and Configure Internet Information
Services for Microsoft Dynamics NAV Web Client
2/19/2018 • 5 min to read • Edit Online

This topic describes how to install and configure Internet Information Service (IIS ) for the Microsoft Dynamics
NAV Web client. To deploy the Microsoft Dynamics NAV Web client, you install the Microsoft Dynamics NAV
Web Server components on a computer that running IIS 7.5, IIS 8.0, IIS 8.0, or IIS 10.0. A website for Microsoft
Dynamics NAV Web client is installed on the IIS.
IIS must have the following features enabled:
HTTP Activation
NET Extensibility 4.5, .NET Extensibility 4.6, or .NET Extensibility 4.6 (depending on Windows version)
ASP.NET 4.5, ASP.NET 4.6, or ASP.NET 4.7 (depending on Windows version)
ISAPI Extensions
ISAPI Filters
Request Filtering
Windows Authentication
Default Document
Directory Browsing
HTTP Errors
Static Content

IMPORTANT
If you are hosting the Microsoft Dynamics NAV Web Server components on an IIS server farm that is using Application
Request Routing (ARR), see Configure Headers in Application Request Routing (ARR) Rules.

TIP
Instead of manually installing IIS, you can use the Dynamics NAV Setup wizard to install and enable the IIS features. For
more information, see Using Microsoft Dynamics NAV Setup to Install IIS Features.

Install IIS on Windows 7, 8, 8.1, and 10


1. On the Start page, choose Control Panel, and then choose Programs.
2. Under Programs and Features, choose Turn Windows features on or off.
The Windows features dialog box appears.
3. Expand the root-level item .NET Framework 4.5 Advanced Services, .NET Framework 4.6 Advanced
Services, or .NET Framework 4.7 Advanced Services, and then do the following:
Select ASP.NET 4.5, ASP.NET 4.6, or ASP.NET 4.7.
Expand WCF Services, and then select HTTP Activation.
4. Expand the root-level item Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0), and then
select Windows Communication Foundation HTTP Activation.

NOTE
The Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0) item is only available if.NET Framework 3.50 is
installed. If the item is not shown, then there is no action for this step.

5. Expand the root-level item Internet Information Services, expand World Wide Web Services, and then
do the following:
a. Expand Application Development Features, and select the following features:
.NET Extensibility 3.5 (if .NET Framework 3.5 is installed)
.NET Extensibility 4.5, .NET Extensibility 4.6, or .NET Extensibility 4.7 (for Windows
10)
ASP.NET 3.5 (if .NET Framework 3.5 is installed)
ASP.NET 4.5, ASP.NET 4.6, or ASP.NET 4.7
ISAPI Extensions
ISAPI Filters
b. Expand Common HTTP Features, and then select Defau lt Document, Default Browsing,
HTTP Errors, and Static Content.
c. Expand Security, and then select the following features:
Request Filtering
Windows Authentication
6. Under Internet Information Services, expand Web Management Tools, and then select IIS
Management Console.
This is an optional step to install Internet Information Service IIS Manager. You use Internet Information
Service IIS Manager to manage local and remote web servers and sites.
7. Choose the OK button to complete the installation.
8. To verify that the web server has been installed correctly, start your browser, and then type
http://localhost in the address.
The default web site opens and should display an IIS 8 image.

Install IIS on Windows Server 2012 and 2016


1. On the Start page, choose Server Manager.
2. In the navigation pane, choose Dashboard, and then choose Add roles and features.
3. In the Add Roles and Features Wizard, in the Before You Begin page, choose the Next button.
4. On the Select installation type page, select Role-based or feature-based installation, and then
choose the Next button.
5. On the Select destination server page, select Select a server from the server pool, select your server
from Server Pool list, and then choose the Next button.
6. In the Select Server Roles window, select Web Server (IIS ), and then choose the Next button.
7. If the Add features that are required for Web Server (IIS ) dialog box appears, then choose Add
Features.

NOTE
If you do not want to install the IIS Management Console, clear the Include management tools check box, and
then choose the Continue button.

8. On the Select features page, expand .NET Framework N.NN, and then select ASP.NET N.NN.
N.NN indicates the version number, which will vary between 4.50, 4.60, and 4.70 depending on the
Windows Server version.
9. Expand WCF Services, and then select HTTP Activation.
10. In the Add features that are required for ASP.NET N.NN? dialog box, choose the Add Features
button.
The following additional features are added.
ASP.NET 4.50, 4.60, or 4.70
ISAPI Extensions
ISAPI Filters
.NET Extensibility 4.5, 4.60, or 4.70
11. If .NET Framework 3.5 is installed, then do the following:
a. Expand the .NET Framework 3.5 Features node.
b. Select HTTP Activate.
c. If the Add features that are required for ASP.NET 3.5 dialog box appears, choose the Add
Features button.
The following additional features are added.
.NET Framework 3.5 (including .NET 2.0 and 3.0)
.NET Extensibility 3.5
12. On the Select Features page, choose the Next button.
13. On the Web Server Role (IIS ) page, choose the Next button.
14. On the Select role services page, verify that the following role services are selected at a minimum.
Common HTTP Features
Default Document
Default Browsing
HTTP Errors
Static Content
Security
Request Filtering
Windows Authentication
Application Development
.NET Extensibility 3.5 (if .NET Framework 3.5 is installed)
.NET Extensibility 4.5, 4.60, or 4.70
ASP.NET 3.5 (if .NET Framework 3.5 is installed)
ASP.NET 4.5, 4.60, or 4.70
ISAPI Extensions
ISAPI Filters
Management Tools (optional)
IIS Management Console (optional)

NOTE
You can leave other role services that are selected by default as selected.

15. Choose the Next button


16. On the Confirm installation selections page, choose the Install button.
17. On the Installation progress page, confirm that your installation completed successfully, and then choose
the Close button.
18. To verify that the web server has been installed correctly, start your browser, and then type
http://localhost in the address.
The default website opens and should display an IIS image.

Configure Headers in Application Request Routing (ARR) Rules


Dynamics NAV Web Server runs on ASP .NET Core, which requires both an X-Forwarded-For header and
X-Forwarded-Proto header in ARR routing rules. However, by default, ARR only adds the X-Forwarded-For header;
not the X-Forwarded-Proto header. So will have to configure the X-Forwarded-Proto header manually.
On the server farm in IIS, add or edit a routing rule to include a server variable for X-Forwarded-Proto . For
example, using IIS Manager, select Routing Rules > URL Rewrite > Edit > Server Variables, and then add a
server variable that has the following settings:

NAME VALUE REPLACE

HTTP_X_FORWARED_PROTO http ot https true

See Also
Deploying the Microsoft Dynamics NAV Web Server Components
How to: Install the Web Server Components
Troubleshooting the Dynamics NAV Web Server and
Client Installation
2/19/2018 • 1 min to read • Edit Online

Use the following links to help resolve problems with Microsoft Dynamics NAV Web Server components and
Web client installation.
Troubleshooting: Microsoft Dynamics NAV Web Client does have styles and images are missing
Troubleshooting: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly
'System.ServiceModel...'
Troubleshooting: 401 - Unauthorized: Access is denied due to invalid credentials.
Troubleshooting: HTTP Error 500 (or 500.21) - Internal Server Error Handler
Troubleshooting: HTTP 500.13 - The request cannot be processed because the amount of traffic exceeds the
Web site's configured capacity
Troubleshooting: Server Error in '-' Application. Access Denied
Troubleshooting: Internet Explorer cannot display the webpage
Troubleshooting: A server error occurred and the content cannot be displayed
Troubleshooting: A fatal error occurred. The connection to SQL server cannot be established
Troubleshooting: Reports that are saved as Excel or Word files are blank
Troubleshooting: Microsoft.AspNetCore.HttpOverrides.ForwardedHeadersMiddleware and Parameter
count between X-Forwarded-For and X-Forwarded-Proto errors

See Also
Microsoft Dynamics NAV Web Client
Deploying the Microsoft Dynamics NAV Web Server Components
How to: Install the Web Server Components
Deploying and Managing Microsoft Dynamics NAV
on Microsoft Azure
1/2/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV 2018 includes the Microsoft Dynamics NAV Provisioning Tools for Microsoft Azure that
enable you to deploy a Dynamics NAV environment on Microsoft Azure virtual machines. You can also use the
provisioning tools to deploy Dynamics NAV on other cloud services and on-premise installations.

About Cloud Services


Cloud service refers to a service that is provided over a network, such as the Internet. The service hosts the relevant
software applications and databases, in this case Dynamics NAV, to which users are given access. The cloud
provider manages the infrastructure that runs the software applications.

About the Microsoft Dynamics NAV Provisioning Tools for Microsoft


Azure
The provisioning tools automate the deployment of Dynamics NAV on virtual machines. They are designed to fully
automate the deployment on Azure. However, with slight modifications, you can use the provisioning tools for
deploying on any virtual machine that is on premise or on the cloud. The provisioning tools include a set of
Windows PowerShell cmdlets and scripts that install and configure Dynamics NAV components, including
Microsoft Dynamics NAV Web Server components, Microsoft Dynamics NAV Server, and SQL database
components.
The provisioning tools include two end-to-end example scripts, Example-1VM.ps1 and Example-2VM.ps1, which
deploy a fully functional Dynamics NAV environment on different network topologies. Example-1VM deploys the
Dynamics NAV components on a single virtual machine. Example-2VM deploys Dynamics NAV on two virtual
machines, where Microsoft Dynamics NAV Web Server components and Microsoft Dynamics NAV Server are
installed on one machine and SQL Server is on the other machine. The scripts illustrate the operations that are
required for full deployment of Dynamics NAV and can be modified to match the specific requirements for your
installation.

Dynamics NAV Clients


After the deployment using the provisioning tools is completed, users can access Dynamics NAV from the
Microsoft Dynamics NAV Windows client or the Microsoft Dynamics NAV Web client from a computer that has a
network connection.

See Also
Planning and Preparing
Deploying Microsoft Dynamics NAV Using the Example Scripts
Deploying Microsoft Dynamics NAV Windows client
Using ClickOnce
1/2/2018 • 20 min to read • Edit Online

This article contains instructions for deploying the Microsoft Dynamics NAV Windows client using the ClickOnce
deployment technology. ClickOnce allows you to deploy web applications by choosing a link on a web page.
ClickOnce is a component of the Microsoft .NET Framework.

ClickOnce installation from the end-user's perspective


As an administrator, you wll provide end users with a link to the ClickOnce deployment source, which can point to
a file share or a website. The end user will choose the link to the application to install Dynamics NAV.
The ClickOnce runtime opens with a confirmation dialog box, which asks whether to install the application
and includes an Install and Don't Install button.
If the user chooses the Install button, ClickOnce downloads all the necessary files to a local folder on their
computer.
When the download is complete, ClickOnce starts the Microsoft Dynamics NAV Windows client, and also
installs a program shortcut on the Start menu of the computer.
The next time that the user want to run the Microsoft Dynamics NAV Windows client, they can either select
the link again, or you select the shortcut on the Start menu. In either case, ClickOnce will check if there is a
newer version available, which the user will have the option to install.
No configuration of the ClientUserSettings.config file is needed during install or after install as this is set up as
part of the ClickOnce deployment.

Benefits of a ClickOnce deployment


ClickOnce has the following benefits:
Allows for a centralized configuration. The Microsoft Dynamics NAV Windows client configuration file
(ClientUserSettings.config) that is installed with the Microsoft Dynamics NAV Windows client contains
several settings that must be adjusted for the specific installation, such as the server address and the
authentication type to use. By using ClickOnce, you can control the ClientUserSettings.config centrally and
push it out to the client computers. Configuration is not required on the individual client computer. If you
make a mistake, or if the settings have to change, such as if you want to move the Microsoft Dynamics NAV
Server instance to a different computer, then you can create an updated configuration file by using the
upgrade capability.
Allows for bundled add-ins. By using ClickOnce, you can easily deploy your own assemblies and third-party
add-in assemblies. You do not have to copy add-in files after the installation.
You can have side-by-side installations. You cannot have two MSI-based Microsoft Dynamics NAV
Windows clients on the same computer. A ClickOnce-deployed Microsoft Dynamics NAV Windows client
does not interfere with other ClickOnce-deployed Microsoft Dynamics NAV Windows clients. This makes it
easy to run against different servers from the same computer. For example, you could have two Microsoft
Dynamics NAV Windows client installations, one for a production server and one for a test server. This also
means that you can run different versions of the Microsoft Dynamics NAV Windows client side-by-side,
which is not possible with MSI.
Multiple languages can be included in the same installer. By using ClickOnce, you can decide which files,
such as language resource files and Help files, that you want to include in the deployment. End users will
not be aware of the difference between installing an EN -US -only version and a version with several
additional languages.
Administrator permissions are not required. By using ClickOnce, a typical Windows user can install the
Microsoft Dynamics NAV Windows client. The prerequisites for installation require administrator
permissions. These prerequisites have to be installed one time on the computer, after which any user can
install and upgrade the Microsoft Dynamics NAV Windows client.
ClickOnce supports a seamless upgrade. End users will hardly notice when the Microsoft Dynamics NAV
Windows client is upgraded.
The result should be that end users can install the Microsoft Dynamics NAV Windows client without relying on
partners or super users to do it for them.
There are some limitations of a ClickOnce-installed Microsoft Dynamics NAV Windows client. For more
information, see Limitations of ClickOnce Installed on the Microsoft Dynamics NAV Windows Client.

Technical Overview of ClickOnce


ClickOnce is a standard .NET technology that has existed since .NET Framework 2.0. The instructions in this article
are meant to help you start working with ClickOnce deployment, however ClickOnce has additional features that
are not described in this article.
The file structure of a ClickOnce deployment is as follows:
Assuming that you have a folder that contains your application files, such as the EXE, DLLs, configuration
files, and other files that your application needs, the files should be organized in subfolders as appropriate
for your application to work correctly.
You create an XML file, usually called the application manifest. This file should be suffixed with .manifest,
and added in the root of your application folder. The application manifest file contains metadata about your
application including a list of all the files, which file is the main executable file, and so on.
You create another XML file, usually called the deployment manifest. This file should be suffixed with
.application, and added to the directory outside the root of your application folder. The deployment manifest
has a link to the application manifest. It also has information about the application, such as a product name,
version number, and so on. This information will be shown in locations such as the Start menu and in Add
or Remove Programs.
When a user installs the application, he runs the deployment manifest, and then ClickOnce will
automatically install the application.

Prepare Users Computers by Installing .NET Framework 4.6.1


The Microsoft Dynamics NAV Windows client requires .NET Framework 4.6.1. Depending on the version of
Windows, .NET 4.6.1 Framework might already be installed. If not, then you have two options:
1. Users themselves install .NET 4.6.1 Framework on their computers from the ClickOnce online installation
web page.
The ClickOnce online installation web page includes a link to download .NET Framework 4.6.1. However,
using this option requires that users have administrative rights on their computers.
2. An administrator installs install .NET 4.6.1 Framework on users computers.
For more information about how to install .NET 4.6.1 Framework, see Install the .NET Framework for
developers.
Deploying Using ClickOnce Hosted on a File Share
It is easier to host a ClickOnce deployment on a file share than it is to host on a web server. Hosting on a web
server is basically the same, except that you may need to make some adjustments to IIS.
Follow these steps to host on a file share:
1. Install Manifest Generation and Editing Tool (mage.exe) on your computer.
The mage.exe is installed with Visual Studio, Windows Software Development Kit (SDK) for Windows 8 or
8.1, and Windows 10 SDK. Microsoft Windows SDK for Windows 7 and the .NET Framework 4. The SDK
contains a utility named mage.exe, which is required in several of the following steps.
The mage.exe utility should be located in the equivalent of the following location:
C:\\Program Files \(x86\)\\Microsoft SDKs\\Windows\\v10.0A\\Bin\\NETFX 4.6.1 Tools

2. (Optional) Obtain a code signing certificate. This is a certificate that is issued by a certification authority, and
will enable you to sign the application in such a way that end users can see that the application is published
by the expected provider and, for example, not by a phisher.
a. If you do not already have a code signing certificate, you will have to obtain one from one of the
certification authorities. For a list of certification authorities, see Microsoft Technet.
b. You can also create a test certificate and use it for testing. For more information, see How to: Create
Your Own Test Certificate or New -SelfSignedCertificate.
c. For information about when it is acceptable to skip this step, see Security Considerations.
3. Install the ClickOnce Installer Tools:
a. On the Dynamics NAV installation media (DVD ), run setup.exe.
b. Choose Custom installation option, choose ClickOnce Installer Tools, and follow the instructions.
The files will be installed in C:\Program Files (x86)\Microsoft Dynamics NAV\100\ClickOnce Installer Tools.
4. Perform a typical installation of the Microsoft Dynamics NAV Windows client as follows:
a. Run setup.exe to install the Microsoft Dynamics NAV Windows client.
If not already installed, you will also need to install the Microsoft Dynamics NAV Server and
database components that the Microsoft Dynamics NAV Windows client connect to.
Do not install unnecessary client components, such as the Microsoft Dynamics NAV Development
Environment and the Excel add-in. These add to the download size, and contain special file types that
can create problems for a ClickOnce deployment. For example, the Web.config file installed with the
development environment can create problems when it is hosted on a web server.
b. Install relevant language packs.
c. Add additional add-ins, if you have any.
d. Run the client, and make sure that everything works as expected.
Now you have the files that you know will work, and which you want to deploy on end user
computers.
5. Copy the Microsoft Dynamics NAV Windows client files to a file share:
a. Create a file share, for example, that has the name \\fileshare\clickonce.
b. Create a folder in the file share, such as \\fileshare\clickonce\Deployment\ApplicationFiles.
c. Copy all the files from C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client to
this new folder.

IMPORTANT
Microsoft.Dynamics.Nav.Client.exe and Microsoft.Dynamics.Nav.Client.x86.exe have the same assembly
identity name, so you must copy only one of these executables. You can choose either file.

d. Move ClientUserSettings.config to that folder.


This file typically installs to the equivalent of C:\Program Data\Microsoft\Microsoft Dynamics
NAV\NNN\, or C:\Users\user name\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\NNN\,
where NN is the version number such as 90, 100 or 110. The exact location depends on your
operating system.
6. Copy the template files. The ClickOnce Installer Tools installation contains template files that will be useful
starting points.
Copy the files in C:\Program Files (x86)\Microsoft Dynamics NAV\100\ClickOnce Installer
Tools\TemplateFiles to \\fileshare\clickonce.
1. Update the application manifest. The application manifest lists the files that are part of the installation.
a. Open a command prompt using the Run as administrator option, and change the directory to
C:\fileshare\clickonce\Deployment\ApplicationFiles.
b. Use mage.exe to update the manifest file to have the correct files as shown in the following code
example.
mage.exe -Update Microsoft.Dynamics.Nav.Client.exe.manifest -FromDirectory .

IMPORTANT
You must specify the fully qualified path to mage.exe, such as
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\Bin\NETFX 4.6.1 Tools\mage.exe" .

The FromDirectory parameter will include all files in all subdirectories found within the specified
directory. If no directory is specified, such as in the example, mage.exe uses the current directory and
subdirectories. For more information, see Mage.exe in the MSDN Library.
ClickOnce does not support having the same assembly duplicated in different folders. If you receive
an error, then you will have to remove one of the copies, either in the manifest file or on disk, and
then run the mage.exe again. The copy of OpenXML.dll in Add-Ins folder will not be needed in a
ClickOnce deployment, therefore you can delete it.
2. Review the application manifest.
Open Microsoft.Dynamics.Nav.Client.exe.manifest in a text editor, like Notepad. You do not have to change
anything in this file, but you should be aware of what it looks like. The application manifest has an identity
(assembly.assemblyIdentity), which is referred to by the deployment manifest. This can be any string, and it
will not be shown to end users. Note the version number, which will be used in upgrade scenarios.
3. (Optional) Sign the application manifest. If you do not sign the manifest, the user will get a security warning
when he installs, because the publisher, who is you, cannot be verified. This means that the end user cannot
distinguish between your application and malware. If you sign the manifest, the user will see that the
application is coming from your company, and he will trust it. If you have the code signing certificate
PartnerCodeSigningCertificate.cer and the private key PartnerPrivateKey.pvk, run the following commands.
cert2spc PartnerCodeSigningCertificate.cer PartnerSoftwarePublisherCertificate.spc

pvk2pfx -spc PartnerSoftwarePublisherCertificate.spc -pvk C:\PrivateFolder\PartnerPrivateKey.pvk -pfx


PartnerPersonalInformationExchange.pfx

mage.exe -sign Microsoft.Dynamics.Nav.Client.exe.manifest -certfile


PartnerPersonalInformationExchange.pfx

Now the application manifest is signed. If you modify it, you will have to sign it again. For information
about when it is acceptable to skip this step, see Security Considerations.
4. Update the deployment manifest.
a. At the command promt, change the directory to ClickOnce Deployment folder, for example,
C:\fileshare\clickonce\Deployment.
b. Run this command to change the link to the application manifest and update its hash value.
mage.exe -update Microsoft.Dynamics.Nav.Client.application -appmanifest
ApplicationFiles\Microsoft.Dynamics.Nav.Client.exe.manifest -appcodebase
\\fileshare\clickonce\Deployment\ApplicationFiles\Microsoft.Dynamics.Nav.Client.exe.manifest

c. Open Microsoft.Dynamics.Nav.Client.application file in a text editor, like Notepad, and do the


following:
a. In the <assemblyIdentity> element, set the name parameter. For example, you could add the
customer’s name to the name, and if you deploy a test and a production server for the
customer, then you could add production or test to the name. You should never change this
value after end users have used it to install the Dynamics NAV client. The value will not be
shown to end users.
b. In the <description> element, change the parameters as appropriate. For example, you could
change the asmv2:publisher parameter to be "Microsoft Corporation and <your company
name>", and change the asmv2:product parameter to be "Microsoft Dynamics NAV 2018 for
<customer name>". These are the names that the end user will see.
c. In <deploymentProvider> element, change the link of the codebase parameter to
\\fileshare\clickonce\Deployment\Microsoft.Dynamics.Nav.Client.application. As you can see,
it is now pointing to itself so that it is possible to check for updates.
5. Optionally, sign the deployment manifest. This is similar to the application manifest.
mage.exe -sign Microsoft.Dynamics.Nav.Client.application -certfile
PartnerPersonalInformationExchange.pfx.

After the deployment manifest is signed, if you modify it, you will have to sign it again. For information
about when it is acceptable to skip this step, see Security Considerations.
6. Now you should be done with your ClickOnce deployment, so you can test the ClickOnce deployment. To
do this, run the Microsoft.Dynamics.Nav.Client.application in the file share, for example, by choosing
\\fileshare\clickonce\Deployment\Microsoft.Dynamics.Nav.Client.application.

NOTE
Do not run the deployment from C:\fileshare\clickonce\Deployment\Microsoft.Dynamics.Nav.Client.application.
This will give you an error that the deployment and application are in different security zones.

7. Verify that everything works as expected. The ClickOnce files are typically installed under C:\Users\user
name\AppData\Local\Apps. In the next step, you will have to know where these files are installed, so locate
the files by searching for Microsoft.Dynamics.Nav.Client.exe under that folder or by typing: dir /s
Microsoft.Dynamics.Nav.Client.exe.
8. As a final verification, we recommend that you compare the files that were installed by ClickOnce, in the
folder you searched for, to the files that were installed by the MSI installer in C:\Program Files\.... There will
be some differences. For example, there will be multiple manifest files in the ClickOnce folder. You should
review these differences and make sure they are as expected. For example, if you see a .DLL file in one
folder, but not the other, this could cause an error.
In addition to creating the installer itself, you should require end users to read and accept Microsoft’s
software license terms (SLT) as part of the installation experience.
Deploying Using ClickOnce Hosting on a Web Server
Hosting on a web server is similar to hosting on a file share. Using the steps outlined in the previous section, you
should note that the two links in the deployment manifest should point to the http:// address, instead of a
\\fileshare address. This is the only change that you need to make to the files.
All the logic needed for requesting user permissions to install or check for upgrades happens on the client
computer. The web server works like a file repository.
The only problem with web server hosting is that web servers use different file types differently. For example, by
default a file that has the .config extension will not be able to be downloaded from a web server. The web server
will restrict access to it. To work around this, you can create a web.config file in the folder that contains the
application files, with contents similar to the following.

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


<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<staticContent>
<mimeMap fileExtension=".config" mimeType="application/x-msdownload" />
<mimeMap fileExtension=".tlb" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".olb" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".pdb" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".hh" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".xss" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".xsc" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".stx" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".msc" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".flf" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".rdlc" mimeType="application/x-msdownload"/>
<mimeMap fileExtension=".sln" mimeType="application/x-msdownload"/>
</staticContent>
<security>
<requestFiltering>
<fileExtensions>
<remove fileExtension=".config" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</configuration>

You should start with an empty .config file, and then use trial-and-error to add the necessary rules, until ClickOnce
can download all the files. If ClickOnce cannot download the files, a report will show which file and which
extension is the problem.
Requiring End Users to Read and Accept Software License Terms
End users who install the Microsoft Dynamics NAV Windows client are required to accept the Microsoft software
license terms. By using the traditional Microsoft Dynamics NAV Windows client installer, this occurs as part of the
installation process. However, by using ClickOnce deployment, this cannot occur as part of the installation process,
and it must therefore occur before the ClickOnce process is started.
If you decide to deploy the Microsoft Dynamics NAV Windows client using ClickOnce, then it is your responsibility
that end users accept the Microsoft software license terms before the installation. We recommend that you also
require end user acceptance of your software license terms and any third-party software license terms that are
part of the ClickOnce deployment.
To help you with this process, you can use the NAVClientInstallation.html template web page that was installed
as part of the ClickOnce Installer Tools. When you try to open that file, you must select the Accept check boxes
before you can install the Microsoft Dynamics NAV Windows client. You can design your own web page, as long
as the process for the end user is the same. The end user cannot install the Microsoft Dynamics NAV Windows
client until he has accepted the software license terms.
Upgrading to a New Version of the Dynamics NAV Client
If you want to push a new version of the Microsoft Dynamics NAV Windows client out to end users, you must do
the following:
Produce a new ApplicationFiles folder. Follow the process that you used to create the first version, but
assign a larger version number to the application manifest. You can replace the old application files in
\\fileshare\clickonce\Deployment\ApplicationFiles, or you can put the new files in a new directory, such as
\\fileshare\clickonce\Deployment\ApplicationFiles2. Make sure to run mage.exe -update to update the
application manifest's file list and hash values. Run mage.exe -sign to sign the application manifest.
Run mage.exe -update to update the deployment manifest's reference to the application manifest as well as
its hash value. Update the deployment manifest's version number. Run mage.exe -sign to sign the
deployment manifest.
The upgrade check is based on the deployment manifest’s version . This is the version of the Microsoft
Dynamics NAV Windows client that will be installed if a user installs Dynamics NAV for the first time. The
deployment manifest also contains a minimumRequiredVersion . If a previously installed Microsoft Dynamics
NAV Windows client has a version that is less than minimumRequiredVersion , then the user is forced to
upgrade the Microsoft Dynamics NAV Windows client. This will appear similar to the following.

<assemblyIdentity name="Microsoft Dynamics NAV" version="11.0.0.0" … />


<deployment install="true" minimumRequiredVersion="11.0.0.0">
<subscription>
<update>
<beforeApplicationStartup />
</update>
</subscription>

The <update> tag determines when the upgrade check is performed. In the example earlier in this section,
beforeApplicationStartup was specified, which means the upgrade check will be performed before the Microsoft
Dynamics NAV Windows client starts and the user will experience a short delay every time that the Microsoft
Dynamics NAV Windows client is started. If you want the upgrade check to be performed in the background every
time that the Microsoft Dynamics NAV Windows client is started, then use the following setting.

<update>
<expiration maximumAge="0" unit="days" />
</update>

With this setting, the user will be able to run the Microsoft Dynamics NAV Windows client without any delay. In
the background, ClickOnce will check if the current version is too low. ClickOnce will enforce the upgrade the next
time that the Microsoft Dynamics NAV Windows client starts. If you want to check for updates, such as every 14
days, then add maximumAge=”14” .
The application manifest version number can be changed independently of the deployment manifest version
number. If you change the version number in the deployment manifest, but keep referring to the same version of
the application manifest, then the user will experience that the Microsoft Dynamics NAV Windows client is
upgraded, but nothing will occur because the new version of the deployment manifest will still point to the same
application version. For example, this can be useful if you want to change the frequency of the upgrade checks or
change the text in the Start menu.
Security Considerations
Installing any application on the local computer requires that you consider whether it is safe to do this. For a
ClickOnce deployment of the Microsoft Dynamics NAV Windows client, here are some recommended security
measures that you should consider:
Internal deployment - If you host the ClickOnce deployment on an internal file share or website, we
recommend that you sign the ClickOnce deployment so that end users will not see an Unknown publisher
message during installation. However, it is also acceptable not to sign the ClickOnce deployment.
Public deployment - If you host the ClickOnce deployment in a public location, we recommend that you
sign the ClickOnce deployment and host it on a secure website (https://). Taking these precautions will
reduce the risk of end users installing applications from bad sources and locations.
Limitations of ClickOnce Installed on the Microsoft Dynamics NAV Windows Client
The following are limitations of ClickOnce installed on the Microsoft Dynamics NAV Windows client.
Command-line arguments - ClickOnce installed on the Dynamics NAV client cannot be run with custom
command-line arguments. For example, this affects the following scenarios:
An end user cannot specify the Home page.
An end user cannot specify a profile. He can only use his default profile.
An end user cannot disable personalization. An administrator can disable personalization on a profile.
An administrator cannot configure profiles. He should use the MSI-installed client for this task.
An end user cannot run in full-screen mode.
An end user cannot disable the navigation pane.
Hyperlinks - The protocol handler dynamicsnav:// is not registered during ClickOnce installation, which
means that the Dynamics NAV client cannot be activated by choosing a hyperlink. This could impact the
following scenarios:
End users cannot send each other links to specific pages.
An end user cannot use the link on a OneNote page.
An end user cannot use the link on a report.
The debugger cannot be started.
External components calling the Microsoft Dynamics NAV Windows client - A ClickOnce-installed
Microsoft Dynamics NAV Windows client will be installed in a randomly generated folder, and when it is
upgraded to a new version, it will be installed a new randomly generated folder. This means that external
components will not be able to detect where the Microsoft Dynamics NAV Windows client executable is
located. This could impact the following scenarios:
An end user can send a list page to Excel, but cannot refresh data from the Excel application.
Third-party applications cannot start the Microsoft Dynamics NAV Windows client.

See Also
Deployment
Configuring Microsoft Dynamics NAV
Installation Options
Configuring Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This section identifies components that you can preconfigure in Microsoft Dynamics NAV 2018 Setup. It also
provides information about settings for individual components, and, for some components, identifies another
document where you can find such information.

Components That You Can Configure In Setup


You can configure some Microsoft components in Dynamics NAV Setup. You can then either proceed to install
software with Setup, or save all configuration information to a Setup configuration file for future use. For more
information, see How to: Preconfigure Components.
When you install a component that you have pre-configured in Setup, the configuration information is transferred
to the appropriate component configuration file. For example, if you pre-configure Microsoft Dynamics NAV
Server in Setup, the relevant configuration information is transferred, upon installation, to the
CustomSettings.config file. This file is stored on the Microsoft Dynamics NAV Server computer in the equivalent
of C:\Program Files\Microsoft Dynamics NAV\110\Service.
The following topics provide additional information on the configuration options for specific components in
Microsoft Dynamics NAV 2018 Setup:
Configuring the Windows Client
Configuring Microsoft Dynamics NAV Server
Configuring Database Components
Configuring Microsoft SQL Server
Configuring the Microsoft Dynamics NAV Web Server and Client
Configuring Microsoft Dynamics NAV Help Server
Configuring NAS Services

See Also
Configuring Automated Data Capture System
Configuring Microsoft SQL Server
Walkthrough: Setting Up Outlook Synchronization
How to: Create Microsoft Dynamics NAV Users
Removing Elements from the User Interface According to Permissions
Profiles and Role Centers
Walkthrough: Setting Up and Using a Purchase Approval Workflow
Migrating to Multitenancy
1/2/2018 • 3 min to read • Edit Online

You can choose to migrate your Dynamics NAV solution to a multitenant deployment architecture where you
maintain a single application that is used by two or more companies that store their data in separate databases.
This can make maintenance of your solution easier if you support multiple customers with the same application
functionality.

Tenants and Companies


When you upgrade your application and the data to Microsoft Dynamics NAV 2018, you have a database that has
the same number of companies as you had before the upgrade. This database is considered a tenant. This does not
mean that you have to turn your solution into a multitenant deployment. But it means that you can if you want to.
For example, your Dynamics NAV deployment in the earlier version consisted of a database that has 20
companies. In other words, you support 20 companies that all share the same application functionality. In this
example, the companies are separate companies that have nothing to do with each other except that they are
supported by you in one database. In Microsoft Dynamics NAV 2018, you can choose to extract the application-
wide tables into a separate database and keep the data for all 20 companies in the original database. This becomes
a single-tenant business data database. Then, you can choose to split the business data database into one for each
company so that you run a truly multitenant environment. The application is stored separately in the application
database, and you maintain application functionality centrally. When you modify the application, you make the
changes available to one tenant at a time. As a result, if something goes wrong, all other tenants are not affected.
Compare this to earlier versions of Dynamics NAV where a database could contain several companies. These
companies could be related or not, but they would all use the same application and write to the same database.
Also, when you modified the application, it would affect all companies immediately. So if something went wrong,
all companies would be affected.

NOTE
The email logging functionality in Dynamics NAV requires the Microsoft Dynamics NAV Server service account to have access
to the Exchange server. But in a multitenant deployment, this is not always possible.

In multitenant deployments of Dynamics NAV, permission sets are stored centrally in the application database, so
only the administrator of the central application can add, remove, or modify permission sets. Instead, the tenants
can use user groups to manage permissions. For more information, see Managing User Groups.
Migration Process
If you decide to move to a multitenant architecture, you must complete the following steps:
1. If your current solution is based on an earlier version of Dynamics NAV, upgrade the database to Microsoft
Dynamics NAV 2018. For more information, see Upgrading the Data.
After this step, you have a database that contains the application-wide tables and the same companies as
before. But it has been upgraded to the Microsoft Dynamics NAV 2018 database schema.
2. Move the tables that describe the application to a separate database. For more information, see Separating
Application Data from Business Data.
After this step, you have two databases: an application database and a business data database.
3. Split the business data database into one for each company. For more information, see Creating Tenants
from Companies.
After this step, you have an application database and a business data database for each company in the
original database. The company-specific business data databases are tenants, and your solution is
multitenant.
If you want to move back to storing application tables and business data in a single database, you can use
the Dynamics NAV Windows PowerShell cmdlets to merge the databases. For more information, see
Merging an Application Database with a Tenant Database.

See Also
Separating Application Data from Business Data
Creating Tenants from Companies
Upgrading the Application Code
Upgrading the Data
Upgrading to Microsoft Dynamics NAV 2017
Merging an Application Database with a Tenant Database
Installing and Configuring Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

The walkthrough topics in this section present the various procedures that administrators or Microsoft Certified
Partners would have to perform to successfully install the three tiers in the Microsoft Dynamics NAV 2018 Product
Architecture.

In This Section
Walkthrough: Installing the Demo Version
Walkthrough: Installing the Three Tiers On Two Computers
Walkthrough: Installing the Three Tiers on Three Computers
Walkthrough: Installing the Microsoft Dynamics NAV Web Server Components on a Single Computer
Walkthrough: Installing the Microsoft Dynamics NAV Web Server Components on Two Computers
Walkthrough: Installing the Microsoft Dynamics NAV Web Server Components on Three Computers
Walkthrough: Deploying Microsoft Dynamics NAV on a Microsoft Azure Virtual Machine
Walkthrough: Deploying Microsoft Dynamics NAV on Two Microsoft Azure Virtual Machines
Walkthrough: Setting Up Outlook Synchronization

See Also
Product and Architecture Overview
How to: Run Setup
How to: Choose Components to Install
How to: Preconfigure Components
Development in Microsoft Dynamics NAV
3/7/2018 • 2 min to read • Edit Online

Before you begin developing code for Microsoft Dynamics NAV 2018, you should consider the following:
How to start learning about C/AL.
How to build on your C/AL knowledge.
How to build an application by using your knowledge of C/AL.
What the differences are between developing applications that run on different clients.
What the differences are between developing in Microsoft Dynamics NAV 2018 and earlier versions of
Dynamics NAV.
How to upload and download files between the server and the client.

NOTE
To develop extensions for Dynamics NAV and Dynamics 365 Business Central you use the AL language. For more
information, see Getting Started with AL.

Developing in Microsoft Dynamics NAV 2018


TO SEE

Learn what you can do with C/AL and where to add C/AL Programming in C/AL
code.

Learn what the C/AL data types are. C/AL Data Types

Learn how to write C/AL statements and expressions. - Statements and Expressions
- Elements of C/AL Expressions
- C/AL Simple Statements
- C/AL Control Statements

Learn about how to debug C/AL. Debugging

Learn about how to use custom controls with C/AL. Extending Microsoft Dynamics NAV Using Control Add-ins

Learn about how to use the new development environment Developing Extensions Using the New Development
using Visual Studio Code. Environment - Preview

Learn about the Microsoft Dynamics NAV Development Application Design Overview
Environment and designing applications.

Learn about how to use multilanguage functionality. Multilanguage Development

Learn the differences in how numeric values are sorted. Sorting Numeric Values
TO SEE

Learn how to use display language-specific strings without CaptionClass Functionality


modifying code.

Learn about how to develop Microsoft Dynamics NAV Web Developing for the Microsoft Dynamics NAV Web Client
client applications.

Learn about how to develop the Microsoft Dynamics NAV Developing for the Microsoft Dynamics NAV Universal App
Universal App.

Learn about how to develop extensions using the new Developing Extensions Using the New Development
development environment. Environment - Preview

Learn about how to use events to design the application to Events in Dynamics NAV
react to specific actions or behavior that occur and to
separate customized functionality from the application
business logic.

Learn about how to display non-intrusive, contextual Notifications


messages to client users.

Learn about how to transfer files between the client and the File Handling
server.

Learn about how to upload media, such as a JPEG or PNG Working with Media on Records
image, on table records for displaying on pages and reports
in the client.

Learn about how to test an application. Testing the Application

Learn about how to emit, collect, and view custom telemetry Instrumenting an Application for Telemetry
for your an application.

Learn about classifying data for compliance. Classifying Data

Learn about differences between developing in Microsoft Changes in C/AL Behavior and Support from Earlier Versions
Dynamics NAV 2018 and earlier versions of Dynamics NAV. of Microsoft Dynamics NAV

See Also
Deployment
Product and Architecture Overview
Application Design Overview
1/2/2018 • 1 min to read • Edit Online

Carefully planning the details of your database application will help to ensure that your database has the best
possible design. An application that has been correctly designed is easier to build and maintain. This section
contains guidelines for creating applications by using the methods of analysis, design, and implementation.

Steps in Designing a Dynamics NAV Application


Designing a Dynamics NAV application usually includes the following steps:
1. Understanding the problem.
2. Designing the data model (tables, fields, relationships, and constraints).
3. Designing the application.
Understanding the Problem
First, you must understand the business problem that you want your application to solve. You may want to know
who will be using the application and what they will be trying to accomplish. For more information about
gathering information and using that information to plan your design, see Developing a Database Plan (SQL
Server).
Designing the Data Model
After you understand the problem that you want your application to solve, you must design the structure of the
database for your application. For more information about how to design the data model, see the following topics:
Designing Databases (SQL Server)
Database Basics (SQL Server)
One consideration when you design your data model is data integrity. Enforcing data integrity guarantees
the quality of the data in the database. You must consider how to define and enforce the following:
Unique values in identifier columns of a table.
Valid data types in each field of a table.
Consistency across tables.
Other constraints that are specific to your application.
For more information about data integrity, see the following topics:
Data Integrity (SQL Server)
Table Keys
Field Data Types
Triggers Overview
Designing the Application
After you have a design for your database, you can begin to design the application itself. Designing the application
involves:
Creating table objects in Dynamics NAV to implement the design of your database.
Designing pages for entering and retrieving data, and reports for viewing and presenting data.
Creating C/AL code to connect the application objects.
Designing objects or writing code to extend functionality or to integrate your application together with
other systems.
For more information about how to design your application, see the following topics:
Designing Application Objects
Programming in C/AL
Objects
Web Services
Extending Microsoft Dynamics NAV

See Also
Development
Programming in C/AL
1/2/2018 • 1 min to read • Edit Online

This section describes where to write C/AL code and how to reuse code.
For more information about how to use system-defined variables, see System-Defined Variables.
For more information about the most frequently used C/AL functions, see Essential C/AL Functions.

Where to Write C/AL Code


Almost every object in Dynamics NAV contains triggers where you can add your C/AL code. Triggers exist for the
following objects:
Tables
Table fields
Pages, including request pages
Reports
Data items
XMLports
Queries
You can initiate the execution of your C/AL code from the following:
Actions
Menu items
Any object that has an instantiation of the object that contains C/AL code. An example of an instantiation is
a variable declaration.

NOTE
If the C/AL code is in a local function, then you cannot run it from another object.

Guidelines for Placing C/AL Code


We recommend the following guidelines for C/AL code:
In general, put the code in codeunits instead of on the object on which it operates. This promotes a clean
design and provides the ability to reuse code. It also helps enforce security. For example, typically users do
not have direct access to tables that contain sensitive data, such as the General Ledger Entry table, nor do
they have permission to modify objects. If you put the code that operates on the general ledger in a
codeunit, give the codeunit access to the table, and give the user permission to execute the codeunit, then
you will not compromise the security of the table and the user will be able to access the table.
If you must put code on an object instead of in a codeunit, then put the code as close as possible to the
object on which it operates. For example, put code that modifies records in the triggers of the table fields.
Reusing Code
Reusing code makes developing applications both faster and easier. More importantly, if you organize your C/AL
code as suggested, your applications will be less prone to errors. By centralizing the code, you will not
unintentionally create inconsistencies by performing the same calculation in many places, for example, in several
triggers that have the same table field as their source expression. If you have to change the code, you could either
forget about some of these triggers or make a mistake when you modify one of them.

See Also
System-Defined Variables
Essential C/AL Functions
Objects
1/2/2018 • 1 min to read • Edit Online

This section contains topics that describe all of the objects that make up the development environment of
Microsoft Dynamics NAV 2018.

Defining the Data Model


TO SEE

Learn about how to define the data model on which you build Tables
your application.

Presenting the Data


TO SEE

Read about how you create pages and work in Page Designer. Pages

Read about how to create reports in Report Dataset Designer Reports


and Visual Studio Report Designer.

Writing Code
TO SEE

Learn about codeunits, modifying codeunits, adding variables, Codeunits


and functions.

Read more about C/AL, the programming language that you Programming in C/AL
use in Dynamics NAV.

Learn how to extend Dynamics NAV. Extending Microsoft Dynamics NAV

Getting Data In and Out of the Database


TO SEE

Learn about Web services. Web Services

Understand what XMLports are used for and how to create XMLports
them.

Learn how to create and use Query objects. Queries

Working with Menus


TO SEE

Learn how to present functionality in menus to the user. MenuSuites

See Also
Development
Data Security
Tables in Microsoft Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

Tables are the fundamental objects in any database. They are the objects in which you store and manipulate data.
This is true no matter what kind of data you need to manage. When you create a new database, you begin by
building the tables. Later, you create pages and reports in order to access and view the data in the tables.
The following sections provide an overview of how to locate Help about designing tables in Dynamics NAV.

Creating Tables
This section explains how to design tables to store your data and set up table descriptions that can ease
sophisticated data manipulation.

TO SEE

Learn about the Dynamics NAV approach to tables in Overview of Tables


database design.

Design and develop a basic table in Dynamics NAV. How to: Create a Table

Decide which field data type to apply to your data. Field Data Types and Data Format Considerations

Apply table and field properties and create effective table How to: View or Modify Properties on a Table or Field
descriptions.

Connect table data through primary and secondary keys. Table Keys

Learn about Dynamics NAV features designed to speed up Accessing Microsoft Dynamics NAV Tables with External Tools
data manipulation and computation.

Using Triggers in Database Design


Dynamics NAV supports setting up actions to take place in response to specific events. These are known as
triggers. The following topics help to explain how Dynamics NAV implements this feature of database design.

TO SEE

Learn about the set of triggers that Dynamics NAV supports Table and Field Triggers
for tables and fields.

Create a table trigger. How to: Define or Modify Table or Field Triggers

See reference information about specific triggers. Triggers

Designing Relationships Between Tables


In Dynamics NAV, the primary way to establish a connection between tables is to use the TableRelation property.
The following topics go into detail about how this works.
TO SEE

Get a brief introduction to relational database design in Setting Relationships Between Tables
Dynamics NAV.

Understand the extra steps SQL Server requires to use the Maintaining Table Relationships on SQL Server
TableRelation property.

Understanding SQL Server and Linked Objects


Dynamics NAV supports special handling for SQL Server Object tables. You can find help on linked objects in the
following topics.

TO SEE

Learn about the LinkedObject table property. Creating Table Definitions from SQL Server Objects (Linked
Objects)

Work with other data sources, including Microsoft Excel and Accessing Objects in Other Databases or on Linked Servers
Oracle databases.

See Also
Special Tables
Development
Dynamics NAV Codeunits Overview
1/2/2018 • 1 min to read • Edit Online

A codeunit is a container for C/AL code that you can use in many application objects. This section describes
codeunits and explains how to create one. It also shows you how to use the functions in a codeunit from other
application objects.

Understanding Codeunits
TO SEE

Learn the purpose and function of codeunits. Understanding Codeunits

Learn how to use the C/AL Editor. Creating and Modifying Codeunits

Learn how to access codeunits and limitations of codeunits. Using Codeunits

Follow step-by-step procedures that show how to use Walkthrough: Using Codeunits
codeunits.

Developing Codeunits
TO SEE

Learn how to create a codeunit. How to: Create a Codeunit

Learn how to modify a codeunit. How to: Modify an Existing Codeunit and How to: Add a
Function to a Codeunit

Learn how to compile and save codeunits. How to: Compile the Code in a Codeunit and How to: Save a
Codeunit
Developing Pages in Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

The following sections provide an overview of how to locate Dynamics NAV documentation about developing
pages.
In Dynamics NAV, pages provide the main way to interact with the RoleTailored client user interface. Pages are
XML -based and can be displayed on multiple display targets. They are also role based to the needs of individual
users.

Page Development Documentation


This documentation is intended for Dynamics NAV developers. It is intended that this topic will help you to quickly
find the information that you need.

TO SEE

Get a general introduction to the page object Pages Overview

Find out what page types are available and to understand Touring the RoleTailored Client Pages
how to choose the right one

Learn about new and changed properties that are available in Page Properties
Page Designer

Creating Pages
TO SEE

Learn how to create a card page Walkthrough: Creating a Customer Card Page in Page
Designer

Learn how to create a list page Walkthrough: Creating a Customer List in Page Designer

Learn how to create a Role Center Walkthrough: Creating a Role Center

Learn how to create a document page Walkthrough: Creating a Document Page

Learn how to create a worksheet page Walkthrough: Creating a Worksheet Page

Learn how to create a wizard using the navigate page type Walkthrough: Creating a Wizard Page

Modifying Pages
TO SEE

Add actions to a customer list page Walkthrough: Adding Actions to a Customer List Page

Add a FactBox to a customer list page Walkthrough: Adding a FactBox to the Customer List Page
Adding Actions to Pages
TO SEE

Find the appropriate actions topic Adding Actions to Pages

Understand how actions are intended to be used in the Actions Overview


RoleTailored client

Learn how to add actions to a page How to: Add Actions to a Page

Learn how to promote actions to the ribbon How to: Promote Actions on Pages

Learn how to create action submenus How to: Add Action Submenus to Pages

Running Pages
TO SEE

Preview a page in the RoleTailored client How to: Run a Page

See Also
Page Designer Troubleshooting
Development
Walkthrough: Pages in Microsoft Dynamics NAV
1/2/2018 • 5 min to read • Edit Online

In Dynamics NAV, pages are the main way to display and organize data. Pages display in the Microsoft Dynamics
NAV Windows client and Microsoft Dynamics NAV Web client, which offer users a visual experience closely
aligned to Microsoft Office and Windows. Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV
Web client are RoleTailored clients where every user has a Role Center page, tailored to their individual needs and
tasks they perform. Other types of pages, such as List pages might display lists of customers or sales orders, while
others such as Document pages, focus on user tasks. Each page has its own set of controls that should only be
used with that page type. For example, Cues are only used on Role Center pages, FastTabs are used on Card and
Document pages, and Fixed Layout controls are used on Worksheet pages.

The Page Object


In Dynamics NAV, a page is basically an XML object composed of controls, properties, actions, triggers, and code.
You create page objects in Page Designer and save them in Object Designer in the same way as you save other
Dynamics NAV objects.
In Page Designer, you can start by creating a blank page or choose from over 10 page types. Pages can be linked to
a source table, unless you want to create a Role Center or a blank page not based on a page type data from a table.
In the Page Designer window, you group controls in a hierarchy that reflects the XML structure of the page. To help
you to create the correct XML layout, page designer provides you with several new properties called Types and
SubTypes. These properties enable you to create controls, specify their position on the page, and how they are
grouped. You set types and subtypes using the drop-down menus in Page Designer.
The following table shows Page Designer Types and SubTypes.

TYPE SUBTYPE

Container ContentArea

FactBoxArea

RoleCenterArea

Group Group

Repeater

CueGroup

FixedLayout

Field No SubType available for this Type

Part No SubType available for this Type

When you add controls, each row is automatically indented, although every time you add a row you can adjust
indentation manually with right and left indentation controls. If you indent an element in your page incorrectly, you
will get an error message when you try to save and compile the page.
Use the Properties window to set your properties on a page. Properties work in the same way for pages as they do
for other Dynamics NAV objects, although there are several new and changed properties in pages. For more
information, see Page Properties.
Use C/AL Globals in Object Designer to define C/AL triggers and functions on a page.

Types of Pages
The following page types are available:
Card
List
Role Center
Card Part
List Part
Document
Worksheet
Confirmation Dialog
List Plus
Navigate Page (Wizard)
Standard Dialog
For more information about page types, see Touring the RoleTailored Client Pages.

Designing Pages
In Dynamics NAV, when you design and create pages you use the Page Designer, which is part of the Object
Designer in.
When you design new pages you should start by looking at the wide variety of roles, tasks, and activities in your
organization. These tasks and activities should be reflected in the pages that you create, and the navigation that
you add to a page. There are several different page types which you can use to help you in this process. Each page
type behaves like a container or template on which you can add controls and navigation elements called actions.
Window size and the positioning are controlled automatically, depending on the display device used. The controls
that you use on a page are determined by the page type that you select.
Pages are metadata driven making them very flexible. They can be delivered on a wider variety of display targets
which makes them more scalable. Pages have been designed to optimize performance and new enhanced controls
mean that there are fewer triggers on pages than there were on forms.
You can change the behavior of pages by making changes to the properties sheet, just as you did with forms. For
example you save and compile pages just like forms. You can access Properties, C/AL code, the C/AL Symbol
Menu, C/AL Globals, and the Field Menu by using the same shortcuts or by using the View menu, as you did in
forms.
In Object Designer, all existing page objects, and any new ones that you create are listed under the Pages button. To
create a new page, you must first open the New Page dialog box and then select a page type. We recommend that
you always select a page type instead of creating a blank page when you design a page.

Page Controls
You can add the following page controls to a page depending on the page type you have chosen:
FactBox
FastTab
Cue
HomePart
ChartPart
PagePart
SystemPart
Ribbon
Filter Pane
For more information about controls, see Touring the RoleTailored Client Pages.

Adding Navigation to Pages


All pages contain menu items and navigation controls called Actions.
In Dynamics NAV there are three categories of Actions:
Action Items
Related Information
Reports
Role Center pages have their own navigation pane and the following actions:
Activity Buttons
Home Items
You can access Action Designer from Page Designer. When you want to add actions to a page, open Page
Designer, choose the last available row at the bottom of the page, choose View, and then choose Actions to
open Action Designer. You use the Action Designer in the same way as you use Page Designer. You add new
actions as rows in the Action Designer window, and set Action Types and SubTypes using the drop-down
menus. Each action also has its own set of properties available in the Properties window.
For more information about actions, see Actions Overview.

Best Practices for Designing Pages


We recommend that you simplify the user experience by reducing what users see by default. You can promote the
information that the users most frequently need to see and hide the less important information. For example:
Place common tasks in the ribbon
Organize information pages under FastTabs and, by default, hide the FastTabs that are infrequently visited.
Use one to three FactBoxes on a page to provide supplementary information and a place for adding notes.

See Also
Touring the RoleTailored Client Pages
Actions Overview
Developing Extensions Using the New Development Environment - Preview
Creating a Page in Microsoft Dynamics NAV
1/2/2018 • 4 min to read • Edit Online

Pages are objects for viewing and editing data in the RoleTailored client. When you create a new page, consider the
page's business purpose, including which user uses it and what tasks the user must have. There are ten page types
from which you can choose, including:
Role Center pages, which are home pages for a specific user role such as account manager or sales order
processor.
List pages, which display multiple records on a page.
Card pages, which are used to modify individual customer or item records.
The page type determines which controls, parts, and properties are valid for the page. For example,
FactBoxes are not allowed on all page types. For more information about page types, see Touring the
RoleTailored Client Pages.
To create a blank page
1. In the Microsoft Dynamics NAV Development Environment, on the Tools menu, choose Object Designer.
2. In Object Designer, choose the Page button, and then choose the New button. The New Page dialog box
appears.
3. If your page is associated with a table, in the Table text box, choose the AssistEdit button, select a table, and
then choose the OK button.
4. Select Create blank page, and then choose the OK button.
The new page appears in Page Designer.

NOTE
If you are running Microsoft Dynamics NAV 2018, you can select Create blank page of type, select the page type,
and then continue to step 9.

5. In the Caption field of the first row, which has the type Container and the subtype ContentArea, type
some descriptive text, such as contentcontainer.

NOTE
This text is used internally for identification purposes and does not appear in the RoleTailored client.

6. Choose another row to automatically complete the Name field.


7. By default, the page is a Card page type. To change to another page type, select a blank row, and on the
View menu, choose Properties.
8. Locate the PageType property, and then set the Value field to the page type you want. For more
information about the different page types, see Touring the RoleTailored Client Pages.
9. Save your page. On the File menu, choose Save As. The Save As dialog box appears.
10. In the ID field, enter the page ID.
11. In the Name field, enter a name.
12. Choose the OK button. Your page is saved.
13. Complete the page design by adding additional controls, parts, and actions as necessary. For more
information, see the following topics:
Page Designer Walkthroughs
Adding Actions to Pages
Creating Activity Buttons for the Navigation Pane
How to: Run a Page

Creating a Page Using the Wizard


The development environment includes a wizard that you can use to create specific page types. In the page wizard,
you choose a page type, and the page wizard automatically adds some content and controls to the page for you,
such as fields, FastTabs, and FactBoxes. The page wizard is designed to help you learn about how to create a page
by adding the basic content and controls. The wizard has limitations and may not add all content that you want on a
page. For example, you cannot use the wizard to add navigation or actions on your page. Depending on the page's
type and complexity, you should manually change a page after you use the wizard.
The following table outlines what the wizard can do for each page type.

WHAT CONFI
THE RMATI STAND
WIZAR ON ARD
D CARDP DIALO DOCU LISTPA LISTPL NAVIG ROLEC DIALO WORK
DOES CARD ART G MENT LIST RT US ATE ENTER G SHEET

Sets X X X X X X X X X X X
the
page
type.

Associ X X X X X X X X X X
ates
the
page
with a
table.

Adds X X X X X X
FastTa
bs
that
includ
e
select
ed
fields.
WHAT CONFI
THE RMATI STAND
WIZAR ON ARD
D CARDP DIALO DOCU LISTPA LISTPL NAVIG ROLEC DIALO WORK
DOES CARD ART G MENT LIST RT US ATE ENTER G SHEET

Places X X X X
fields
in a
list
that
has
select
ed
fields
that
define
the
colum
ns.

Adds X X X X X X
a
FactBo
x that
includ
es
page,
syste
m, or
chart
parts.

To create a page using the wizard


1. In the development environment, on the Tools menu, choose Object Designer.
2. In Object Designer, choose the Page button, and then choose the New button. The New Page dialog box
appears.
3. Select Create page using wizard, and then choose the page type from the list.
4. To specify the table with which your page is associated, in the Table text box, choose the AssistEdit button,
select a table, and then choose the OK button.

NOTE
RoleCenter page types are not associated with a table.

5. Choose the Finish button.


The new page appears in Page Designer.
6. Save the page. On the File menu, choose Save As. The Save As dialog box appears.
7. In the ID field, enter the page ID.
8. In the Name field, enter a name.
9. Choose the OK button. Your page is saved.
10. Complete the page design by adding additional controls, parts, and actions as necessary. For more
information, see the following topics:
Page Designer Walkthroughs
Adding Actions to Pages
Creating Activity Buttons for the Navigation Pane
How to: Run a Page

See Also
Pages
Pages Overview
How to: Add FastTabs to a Customer Card Page
Adding a FactBox to Page
Making a Page or Report Available From Search in the Windows Client
Adding a FactBox to Page
1/2/2018 • 1 min to read • Edit Online

A FactBox is the area that is located on the right-most side of a page. This area is used to display content including
other pages, charts, and system parts such as Microsoft Outlook, Notes, and Record Links. Typically, you can use a
FactBox to display information that is related to an item on the main content page. For example, on a page that
shows a sales order list, you can use a FactBox to show sell-to customer sales history for a selected sales order in
the list. The following illustration shows a FactBox on sales order page.

A FactBox is divided into one or more parts that are arranged vertically. Each part can contain one of the following
objects:
Page of the CardPart or ListPart type.
Chart.
System part, including Microsoft Outlook, Notes, MyNotes, or RecordLinks. For more information about
system parts, see Touring the RoleTailored Client Pages.

Supported Page Types


A FactBox is only supported on the following pages:
Card
Document
List
ListPlus
Navigate
Worksheet

See Also
How to: Add a FactBox to a Page
Adding Actions to Pages
1/2/2018 • 1 min to read • Edit Online

In the RoleTailored client for Microsoft Dynamics NAV, menu items are called actions. The topics in this section
provide information about creating and modifying actions on pages. Creating actions can include adding Action
Items to a page, using Action Designer, configuring Home Items on a user Role Center, or adding Reports to a
page.

Actions Documentation
This documentation is intended for Microsoft Dynamics NAV developers. It is intended that this topic will help you
quickly find the information about actions that you need.

TO SEE

Learn about actions in the RoleTailored client. Actions Overview

Learn how to add actions to a page. How to: Add Actions to a Page

Learn how to add promoted actions to the ribbon. How to: Promote Actions on Pages

Learn how to create actions submenus. How to: Add Action Submenus to Pages

See Also
Page Designer Troubleshooting
Arranging Fields in Rows and Columns
1/2/2018 • 1 min to read • Edit Online

By default, page fields are arranged automatically in two columns. For more information, see Field Arrangement on
FastTabs. You can use a GridLayout control or a FixedLayout control to arrange fields in rows and columns on page.
This topic outlines the differences between the two controls to help you determine which control to use.

Comparing GridLayout and FixedLayout Controls


The GridLayout control is a new control and is the preferred method because it gives you more layout options and
is generally easier to use. The following table outlines the GridLayout and FixedLayout control characteristics and
their differences.

CHARACTERISTICS GRIDLAYOUT FIXEDLAYOUT

General usage and field layout Places fields in a uniform grid. When Places fields in a table or matrix-like
setting up a grid layout, you can decide configuration that has a row and
to set up fields in a row-by-row or column headings. You can only set up
column-by-column basis. fields on a column-by-column basis. You
typically use the FixedLayout control to
display statistical data in a FastTab or
information in the details section of a
Worksheet page. If you are using the
CRONUS International Ltd.
demonstration database, then you can
see examples of these uses in page 151,
Customer Statistics, and page 40, Item
Journal.

Field captions Shows or hides captions above each Shows captions as a heading to the
field. rows and columns. You cannot specify a
heading for each field.
Place captions before or above the field.

Row and column spanning Can span rows and columns. Cannot span rows and columns.

Field appearance Shaded with a border. No shading or border.

See Also
How to: Arrange Fields in Rows and Columns Using the GridLayout Control
How to: Arrange Page Fields in Rows and Columns Using a FixedLayout Control
Setting Up Cues
1/2/2018 • 1 min to read • Edit Online

A Cue is a tile on a page in the Dynamics NAV client that provides a visual representation of aggregated business
data, such as the number of open sales invoices or the total sales for the month. Cues are designed to give users
with a quick status of their daily activities, which acts as a prompt them to take action. You typically add Cues on
Role Center pages so that they are readily available to users.
The following figure illustrates a couple of the Cues that are available on Order Processor Role Center in the
CRONUS International Ltd. demonstration database.

In This Section
Use the following table to help you start creating and modifying Cues.

TO SEE

Get an overview of Cue design and how to create and Creating and Customizing Cues
customize Cues.

Set up an indicator on a Cue that changes color based on the Setting Up Colored Indicators on Cues
value in the Cue.

Change the icon that appears on the Cue. How to: Set Up an Image on a Cue

Change the format of data in the Cue. Formatting the Data in a Field

Learn how to create a Cue by using a FlowField. Walkthrough: Creating a Cue Based on a FlowField

Learn how to create a Cue by using a query object. Walkthrough: Creating a Cue Based on a Normal Field and a
Query
Overview of Reports in Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

You can use reports to print or display information from a database. You can use a report to structure and
summarize information and to print documents, such as invoices. For example, you can create a report that lists all
customers and all orders that have been added by each customer. You can also create a report that is automatically
filled with the relevant information for an invoice.
You can also use reports to process data without printing or displaying content. For example, you can use a report
to automate updating all prices in an item list. It can be easier to create a report to process data instead of a
codeunit to do the same processing because you can use:
Request page functionality to select options and filters for data items, which are available in a report but are
difficult to add to a codeunit.
Report data items instead of writing code to open tables and retrieve records.
Data modeling, which is available when you design reports.

Creating reports
Creating a report involves two primary tasks. First you design the data model, or dataset, by using Report Dataset
Designer. The dataset determines the data that is extracted or calculated from the Dynamics NAV database tables
that can be used in a report. After the dataset has been designed, you design the visual layout of the report. There
are two types of report layouts that you can create: client report definition (RDLC ) report layouts and Word report
layouts. You create RDLC report layouts by using Visual Studio Report Designer or SQL Server Report Builder.
You create Word report layouts by using Microsoft Word 2013.

Getting started
The following table includes links to information to help you get started designing reports.

TO SEE

Understand the difference between designing a data model Report Design Overview
for a report and designing the layout for a report.

Understand the different types of reports. Types of Reports

Learn how to design reports. Designing Reports

Learn the system requirements for Microsoft Dynamics NAV System Requirements for Microsoft Dynamics NAV
2018 reports.

Upgrade a Microsoft Dynamics NAV 2009 report to a Upgrading Reports from Earlier Versions
Microsoft Dynamics NAV 2018 report.

Add a report to the ribbon in the RoleTailored client. How to: Make a Report Available from a Page
TO SEE

Learn about the different ways to run a specific report. How to: Run Reports

Printing Reports

Learn about report triggers and when they are called during Report Triggers
report processing.

Learn about how to design request pages for reports. Request Pages

Step through detailed examples of creating reports Report Design Walkthroughs

Use Visual Studio Report Designer to design the layouts of Report Designer
reports

See Also
Objects
Queries
1/2/2018 • 2 min to read • Edit Online

A query object enables you to specify a set of data from the Dynamics NAV database. You can query the database
to retrieve fields from a single table or multiple tables. You can specify how to join tables in the query. You can
filter the result data. You can specify totaling methods on fields, such as sums and averages.
The following section describes how to locate Microsoft Dynamics NAV 2018 documentation about designing
queries in Dynamics NAV.

Creating Queries
This section explains how to design queries to specify datasets.

TO SEE

Learn how to create a basic query in Query Designer. How to: Create Queries

Learn the supported ways to join tables in Query Designer. Understanding Data Item Links

Learn how to add totaling methods to columns in a query. Understanding Query Totals and Grouping

Learn how to filter the results of a query. Understanding Query Filters

Learn how to run queries from C/AL code Working with Queries in C/AL

Learn how to create complex queries by walking through Walkthrough: Creating a Query to Link Two Tables
examples that use the CRONUS International Ltd.
demonstration database. Walkthrough: Creating a Query That Uses a Totaling Method
and Sorting

Walkthrough: Creating a Query to Link Three Tables

NOTE
You cannot run a query that gets data from both the application database and the business data database. This also applies
to single-tenant deployments so that you do not have to rewrite queries if you decide to export the application. For a
description of which tables are considered part of the application database, see Separating Application Data from Business
Data.

Using Queries
The following examples show how you can use queries in your Dynamics NAV application.
Creating charts that are based on a query instead of a table.
Saving a query as an .xml or .csv file. You can use the SAVEASXML Function to create an .xml file that
contains the resulting dataset of a query. You can use the .xml file to integrate with external applications.
Exposing data as an OData web service. You can register and publish a query as a web service in the same
way that you can register and publish pages or codeunits as web services. You use the Web Services page
to register and publish pages, codeunits, or queries. After you expose a query as a web service, you can
import it into other applications. For example, you can import Dynamics NAV data into Microsoft Excel
using Microsoft PowerPivot for Excel, which is a data analysis add-in. You can then create PivotTables in
Excel that use the Dynamics NAV data from your query. For an example , see Walkthrough: Combining
Data from Microsoft Dynamics NAV Queries and Pages with Data from Azure DataMarket (OData)
XMLports in Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

XMLports are used to export or import data between an external source and a Dynamics NAV database. Sharing
data between different computer systems is seamless when it is shared in XML format. Working with XML files
can be tedious so the details of how the XML file is handled are encapsulated in XMLports.
To use an XMLport to import or export data, you first design the XMLport in the XMLport Designer window and
set some properties. You can run the XMLport from Object Designer or create a codeunit to run the XMLport. For
more information about how to run XMLports in a codeunit, see How to: Create Codeunits to Run XMLports. For
information about how to run XMLports in Object Designer, see How to: Run an XMLport from Object Designer.
If you are upgrading from an earlier version of Dynamics NAV and used Dataports in the earlier version, then you
should analyze the functionality of each Dataport and re-create that functionality in Microsoft Dynamics NAV
2018 using XMLports.

Introducing XMLports
The following table lists topics that provide detailed information about how to use XMLports.

TO SEE

Read about the XMLport Designer window. XMLport Designer

Read about triggers available for XMLports and XMLport XMLport Triggers
elements.

Learn how to design an XMLport for import or export. - Designing XMLports


- How to: Create XMLports

Learn how to create codeunits to run XMLports. How to: Create Codeunits to Run XMLports

Learn about designing request pages for XMLports Request Pages (XMLPorts)

Learn how to run XMLports from Object Designer. How to: Run an XMLport from Object Designer

Read about XMLport data types and functions. XMLport Data Type

XMLports Walkthroughs
The following table lists topics that provide information about how to use XMLports to create scenario based
applications.

TO SEE

Learn how to export data from a Dynamics NAV table into an Walkthrough: Exporting Data from Tables to XML Documents
XML document.
TO SEE

Learn how to import data from an XML document to multiple Walkthrough: Inserting Data from XML Documents to
tables in a Dynamics NAV database. The XML document Multiple Tables
contains data that belongs in two different tables in the
database.

Learn how to export data from tables to CSV (comma Walkthrough: Exporting Data from Tables to CSV Files
separated value) files.

Learn how to import data from text files. Walkthrough: Importing Data from Text Files to Tables

See Also
Designing XMLports
Getting Started with MenuSuites in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

MenuSuites contain menus that enable users to navigate and perform actions in the Microsoft Dynamics NAV
Windows client. MenuSuites display menus on the Departments page in the Microsoft Dynamics NAV Windows
client. Dynamics NAV provides a basic MenuSuite that can be modified. You can also create your own
MenusSuites. You create MenuSuites in Object Designer and modify them in Navigation Pane Designer. For
information about Navigation Pane Designer, see Navigation Pane Designer.

NOTE
MenuSuites are not supported by Microsoft Dynamics NAV Web client. They are used only to build the Department page in
the Microsoft Dynamics NAV Windows client.

A MenuSuite has the following characteristics:


Consists of a set of menus.
Contains a menu node that can be either a menu group or a menu item.
Has a GUID (Globally Unique Identifier).
Contains a collection of menu nodes in a menu group.
A menu item is the lowest level in the tree. When you select a menu item, its associated object such as a
report, a batch job, or a codeunit, is run.

MenuSuite Topics
The following table lists topics that provide information about MenuSuites.

TO SEE

Learn about how to design MenuSuites. Designing MenuSuites

Learn about how to create a new MenuSuite. Walkthrough: Creating MenuSuites for the Microsoft
Dynamics NAV Windows Client

Learn about how create a menu for a department. How to: Create a Menu for a Department in a MenuSuite

Learn about how to make changes to a menu that opens a How to: Modify a Department Menu in a MenuSuite
department.

Learn about how to make changes to menu items. How to: Modify Menu Items in a MenuSuite

See Also
Designing MenuSuites
Working with Dynamics NAV Web Services
1/2/2018 • 2 min to read • Edit Online

The following sections provide an overview of the documentation for web services in Microsoft Dynamics NAV
2018.

SOAP and OData based Web Services


This section provides overview material and information that is relevant to both SOAP and OData web services in
Microsoft Dynamics NAV 2018.

TO SEE

Compare the features and constraints of SOAP and OData Web Service Alternatives: SOAP and OData
web services.

Create and publish a web service. How to: Publish a Web Service

Avoid issues that may occur when Dynamics NAV pages Handling UI Interaction When Working with Web Services
expect user interaction.

Coordinate web service applications across multiple time Managing Time Zones with Web Services
zones.

Avoid data loss that can be caused by out-of-date proxies. Preserving Data When Working with a Statically Generated
Proxy

Implement policies to make your web services easier to Web Services Best Practices
understand and maintain.

SOAP Web Services


The topics in this section describe how to create and maintain SOAP web services.

TO SEE

Review the different options for creating URIs to interact with SOAP Web Service URIs
SOAP web services.

Review the operations that are available when a page is Basic Page Operations
exposed as a web service.

Learn how to write code that provides a list of existing How to: Use SystemService to Find Companies
companies in a Dynamics NAV database.

Ensure that field values are actually updated from web Using Properties with Visual Studio to Indicate the Presence of
services. a Value in a Field

OData Web Services


The topics in this section describe how to create and maintain OData web services.
TO SEE

Use OData to obtain an AtomPub document. How to: Use OData to Return-Obtain an AtomPub Document

Use OData to obtain a service metadata (EDMX) document. How to: Use OData to Return-Obtain a Service Metadata
(EDMX) Document

Use OData to obtain a JavaScript Object Notation (JSON) How to: Use OData to Return-Obtain a JSON Document
document.

Write to the database through an OData web service that Using OData Web Services to Modify Data
exposes a writable page

Use filter expressions in OData URIs. Using Filter Expressions in OData URIs

Use FlowFilters in OData URIs. How to: Use FlowFilters in OData URIs

Use server-driven paging in OData URIs. Server-Driven Paging in OData Web Services

Web Services Walkthroughs


The topics in this section demonstrate how to implement Dynamics NAV web services.

TO SEE

Create an extension codeunit for an existing page, expose the Walkthrough: Creating a Web Service using Extension
page, and then write code that calls the page. Codeunits (SOAP)

Create and consume a simple codeunit web service. Walkthrough: Creating and Using a Codeunit Web Service
(SOAP)

Create and consume a page as a SOAP web service. Walkthrough: Registering and Using a Page Web Service
(SOAP)

Create and consume a page as an OData web service. Walkthrough: Creating and Interacting with a Page Web
Service (OData)

View and analyze Dynamics NAV page data in Microsoft Excel Walkthrough: Viewing Page Data in Excel Using PowerPivot
using Microsoft PowerPivot for Excel, which is a data analysis (OData)
add-in.

Make web service communication more secure. Walkthrough: Configuring Web Services to Use SSL (SOAP
and OData)

Combine data from Microsoft Dynamics NAV 2018 with data Walkthrough: Combining Data from Microsoft Dynamics NAV
from Microsoft Azure Marketplace. Queries and Pages with Data from Azure DataMarket (OData)

Create and interact with an OData V4 Bound Action Walkthrough: Creating and Interacting With an OData V4
Bound Action
Events in Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This section describes how you can use events in Dynamics NAV. The use of events is a proven and established
programming concept that can ease application upgrade and limit or even eliminate the need for code
modifications in customized applications because of application platform changes.

In This Section
This section contains the following topics about events.
Introducing Events
Publishing Events
Raising Events
Subscribing to Events
Debugging Events
Best Practices with Microsoft Dynamics NAV Events
Walkthrough: Publishing, Raising, and Subcribing to an Event in Microsoft Dynamics NAV
Walkthrough: Implementing New Workflow Events and Responses
Notifications
1/2/2018 • 5 min to read • Edit Online

Notifications provide a programmatic way to send non-intrusive information to the user interface (UI) in the
Dynamics NAV Web client. Notifications differ from messages initiated by the MESSAGE function. Messages are
modal, which means users are typically required to address the message and take some form of corrective action
before they continue working. On the other hand, notifications are non-modal. Their purpose is to give users
information about a current situation, but do not require any immediate action or block users from continuing with
their current task. For example, you could have a notification that a customer's credit limit is exceeded.

Notifications in the UI
In the UI, notifications appear in the Notification bar (similar to validation errors) at the top of the page on which
a user is currently working. The user can then choose to dismiss the notification, which clears it. Or if actions are
defined on notification, the user can choose one of the actions.
There can be multiple notifications. The notifications appear chronological order from top to bottom.
Notifications remain for duration of the page instance or until the user dismisses them or takes action on them.
Notifications that are defined on sub-pages, for example in parts and FactBoxes, appear in the same
Notification bar.
Validation errors on the page will be shown first.

Notifications in the development environment


By using the Notification and NotificationScope data types and functions in C/AL, you can add code to send
notifications to users. The following table provides an overview of the available functions. The sections that follow
provide additional information about how to create notifications.

FUNCTION DESCRIPTION

MESSAGE Specifies the content of the notification that appears in the UI.

SCOPE Specifies the scope in which the notification appears.

SEND Sends the notification to be displayed by the client.

ADDACTION Adds an action on the notification.

SETDATA Sets a data property value for the notification

GETDATA Gets a data property value from the notification.

RECALL Recalls a sent notification.

Creating and sending a notification


You create a notification by using the MESSAGE and SEND functions. The MESSAGE function defines the
message part of the notification. When the SEND function is called, the notification is sent to the client and
content of the message is displayed.
MyNotification.MESSAGE := 'This is a notification';
MyNotification.SEND;

The SEND function call should be the last statement in the notification code, after any ADDACTION or
SETDATA function calls for the notification instance.

Defining the notification scope


The scope is the realm in which a notification is broadcast in the client. There are two different scopes: LocalScope
and GlobalScope.
A LocalScope notification appears in context of the user's current task, that is, on the page the user is
currently working on. LocalScope is the default.
A GlobalScope notification is not directly related to the current task. Note: GlobalScope is currently not
supported, so do not use it. This will be implemented in a future release.
The following code creates a notification in the LocalScope:

MyNotification.MESSAGE := 'This is a notification';


MyNotification.SCOPE := NOTIFICATIONSCOPE::LocalScope;
MyNotification.SEND;

Adding actions on a notification


You add actions on notifications by using the ADDACTION function. This function provides a way for you to
create interactive notifications. By default, users have the option to dismiss the notifications. However, there might
be cases where you want to provide users with different actions that they can take to address the notification, like
opening an associated page for modifying data.
Conceptually, a notification action calls a function in a specified codeunit, passing the notification object in the call.
The function includes the business logic for handling the action.

MyNotification.MESSAGE := 'This is a notification';


MyNotification.SCOPE := NOTIFICATIONSCOPE::LocalScope;
MyNotification.ADDACTION('Action 1',CODEUNIT::"Action Handler",'RunAction1');
MyNotification.ADDACTION('Action 2',CODEUNIT::"Action Handler",'RunAction2');
MyNotification.SEND;

The basic steps for adding an action are as follows:


1. Create a global function in a new or existing codeunit. The function must have a Notification data type
parameter for receiving the notification object.
2. Add C/AL code to the function for handling the action.
3. Specify the codeunit and function in the ADDACTION function call.

IMPORTANT
You can have more than one action on a notification. A LocalScope notification can have up to 3 actions. A GlobalScope
notification can have up to 2 actions.

Sending data with a notification


You use the SETDATA and GETDATA functions to add data to a notification, which is typically needed when
actions are invoked. The SETDATA function sets, or adds, data to the notification. The data is defined as text in a
key-value pair. With the GETDATA function, you can then retrieve the data again.
The following code sets data for a notification:

MyNotification.MESSAGE := 'This is a notification';


MyNotification.SCOPE := NOTIFICATIONSCOPE::LocalScope;
MyNotification.SETDATA('Created',FORMAT(CURRENTDATETIME,0,9));
MyNotification.SETDATA('ID',FORMAT(CREATEGUID,0,9));
MyNotification.ADDACTION('Action 1',CODEUNIT::"Action Handler",'RunAction1');
MyNotification.ADDACTION('Action 2',CODEUNIT::"Action Handler",'RunAction2');
MyNotification.SEND;

The following code gets the data for a notification:

DataValue := MyNotification.GETDATA('Created');
DataValue := MyNotification.GETDATA('ID');

Example
This simple example illustrates how notifications work and provides some insight into how you can use them. This
example uses page 42 Sales Order of the CRONUS International Ltd. demonstration database according to the
following.
The code compares a customer's balance with their credit limit. If the balance exceeds the credit limit, a
notification is sent to the client.
The notification includes an action, which has the caption Change credit limit, that opens page 21 Customer
Card. This enables the user to increase the credit limit.
To complete the example, follow these steps:
1. In C/AL code for page 42 Sales Order, add the following variables and text constants:

VARIABLE NAME DATA TYPE SUBTYPE

Customer Record Customer

CreditBalanceNotification Notification

OpenCustomer Text

TEX T CONSTANT NAME CONSTVALUE

Text003 The customer's current balance exceeds their credit limit.

Text004 Change credit limit

2. Add the notification code on page 42 Sales Order.


For this example, add the code on OnOpenPage tigger in C/AL .
Customer.GET("Sell-to Customer No.");
IF Customer."Balance (LCY)" > Customer."Credit Limit (LCY)" THEN
BEGIN
//Create the notification
CreditBalanceNotification.MESSAGE(Text003);
CreditBalanceNotification.SCOPE := NOTIFICATIONSCOPE::LocalScope;
//Add a data property for the customer number
CreditBalanceNotification.SETDATA('CustNumber', Customer."No.");
//Add an action that calls the Action Handler codeunit, which you define in the next step.
CreditBalanceNotification.ADDACTION('Text004', CODEUNIT::"Action Handler", OpenCustomer);
//Send the notification to the client.
CreditBalanceNotification.SEND;
END

3. Create a codeunit, called Action Handler, for handling the notification action as follows:
Add a global function called OpenCustomer that has a Notification data type parameter called
CreditBalanceNotification for receiving the Notification object.
Add the following C/AL variables to the codeunit:

VARIABLE NAME DATA TYPE SUBTYPE

CustNumber Text

CustNo Text

CustRec Record Customer

CustPage Page Customer Card

Add the following code to the OpenCustomer function:

//Get the customer number data from the SETDATA call.


CustNo := CreditBalanceNotification.GETDATA(CustNumber);
// Open the Customer Card page for the customer.
IF CustRec.GET(CustNo) THEN BEGIN
CustPage.SETRECORD(CustRec);
CustPage.RUN;
END ELSE BEGIN
ERROR('Could not find Customer: ' + CustNo);
END;

See Also
Extending Microsoft Dynamics NAV
1/29/2018 • 1 min to read • Edit Online

This section describes how you can extend the functionality of Microsoft Dynamics NAV 2018 by using the
following features.

FEATURE DESCRIPTION SEE

Component Object Model (COM) You can extend the functionality by Extending Microsoft Dynamics NAV
technologies implementing automation and custom Using COM
controls. The Microsoft Dynamics NAV
Windows client supports automation
servers by acting as an automation
controller and using OCXs (custom
controls).

NOTE: COM is not supported by the


Microsoft Dynamics NAV Web client.

Microsoft .NET Framework You can extend the RoleTailored clients Extending Microsoft Dynamics NAV
interoperability and Microsoft Dynamics NAV Server Using Microsoft .NET Framework
with functionality that is available in Interoperability
Microsoft .NET Framework assemblies.
You can take advantage of .NET
Framework interoperability so that
Dynamics NAV objects can interact with
the .NET Framework objects.

Control add-ins With Dynamics NAV you can write Extending Any Microsoft Dynamics NAV
control add-ins that add custom Client Using Control Add-ins
functionality to Role Centers and pages
on all display targets, using the same
extensibility framework.

Extensions The extensions framework provides a Developing Extensions in AL


way to extend and customize a
Dynamics NAV deployment without the
need to directly modify source objects.

NOTE
When Dynamics NAV data is consumed in a browser or by a Microsoft .NET Framework assembly, users cannot be
authenticated if their user name or password contains Unicode characters. This is a limitation in the basic authentication
mechanism that is defined in the HTTP/1.1 specification.
The same limitation applies to exposing Dynamics NAV data in web services.

See Also
Extending Microsoft Dynamics NAV Using COM
Extending Microsoft Dynamics NAV Using Microsoft .NET Framework Interoperability
Extending the Windows Client Using Control Add-ins
Development in AL
4/16/2018 • 3 min to read • Edit Online

TIP
We've moved AL developer documentation for Dynamics 365 Business Central! Visit our new library for AL documentation
here!
You'll still find a bit of AL content here that applies to Dynamics NAV.
Extending Any Microsoft Dynamics NAV Client Using
Control Add-ins
1/2/2018 • 1 min to read • Edit Online

With Dynamics NAV you can write control add-ins that add custom functionality to Role Centers and pages on all
display targets, using the same extensibility framework. The following sections provide an overview of the
documentation that is available to develop and use control add-ins.
Control add-ins that are designed with Microsoft Dynamics NAV 2013 R2, Microsoft Dynamics NAV 2015, or
Microsoft Dynamics NAV 2016 using a .NET 4.5 assembly and a manifest file, can be used on all display targets.
Control add-ins that were written for earlier versions, will still run on the Microsoft Dynamics NAV Windows
client.

NOTE
Javascript-based client add-ins in repeater controls, such as lists, listparts, list subpages, and worksheets, are not supported
on any of the Dynamics NAV clients.

NOTE
To support control add-ins running in IE7 mode, you can enable a key in the ClientUserSettings.config file. For more
information, see the Settings in the ClientUserSettings.config file section in Configuring the Windows Client.

Getting an Overview of Client Control Add-ins


TO SEE

Get a general overview about client control add-ins and Extending Any Microsoft Dynamics NAV Client Using Control
where they fit in the Microsoft Dynamics NAV 2018 Add-ins
architecture.

Go through an example of how to implement a simple control Walkthrough: Creating and Using a Client Control Add-in
add-in, creating a .NET assembly, a manifest file, and a page to
display the control add-in from.

Review an example of a manifest file. Manifest Overview

Get reference Help on the available methods for the InvokeExtensibilityMethod Method, GetImageResource
extensibility framework. Method, GetEnvironment Method, and OpenWindow
Method.

See Also
Developing for the Microsoft Dynamics NAV Universal App
Developing for the Microsoft Dynamics NAV Web Client
Extending Microsoft Dynamics NAV Using Microsoft
.NET Framework Interoperability
1/2/2018 • 1 min to read • Edit Online

You can extend the RoleTailored clients and Microsoft Dynamics NAV Server with functionality that is available in
Microsoft .NET Framework assemblies. You can take advantage of .NET Framework interoperability so that
Dynamics NAV objects can interact with .NET Framework objects. In your Dynamics NAV objects, you can
reference .NET Framework assemblies and call their members directly from C/AL code. You can use assemblies
from the .NET Framework class library, which are found in the global assembly cache; your own custom
assemblies; or third-party assemblies. For more information, see Assembly Installation in the GAC.
.NET Framework interoperability offers an alternative to COM so that you can extend your solution. For example,
you can use .NET Framework interoperability to:
Consume web services.
Integrate with Microsoft Office products.
Create .NET Framework applications that target the RoleTailored client.

Microsoft Dynamics NAV Web client support


For the Microsoft Dynamics NAV Web client, you can only implement Microsoft .NET Framework Interoperability
objects that are configured to run on Microsoft Dynamics NAV Server. Client-side objects are not supported. For
more information, see Setting .NET Framework Types to Target the Microsoft Dynamics NAV Windows Client or
Server

See Also
Calling .NET Framework Members from C/AL
Mapping Between .NET Framework and C/AL Types
Using Arrays
Using Collections
Using Enumerations
Using Generics
Using Interfaces
Calling External Web Services
Extending Microsoft Dynamics NAV Using COM
1/2/2018 • 1 min to read • Edit Online

This section describes how you can extend the Microsoft Dynamics NAV Windows client by using Component
Object Model (COM ) technologies. The Microsoft Dynamics NAV Windows client supports Automation servers
by acting as an Automation controller and using OCXs (custom controls).

See Also
COM Overview
Using COM Technologies in Microsoft Dynamics NAV
How to: Create an Automation Controller
Developing for the Microsoft Dynamics NAV Web
Client
1/2/2018 • 4 min to read • Edit Online

Microsoft Dynamics NAV Web client is a web-based application that lets users interact with Dynamics NAV data
over the network from a web browser. The Microsoft Dynamics NAV Web client user interface resembles the
Microsoft Dynamics NAV Windows client. Use the following guidelines to develop Microsoft Dynamics NAV Web
client applications.
Understand the Business Scenario
Design the Data Model
Install the Development Tools
Create Microsoft Dynamics NAV Objects
Create Users and Grant Permissions to Objects
Create Profiles and Assign Users

Understand the Business Scenario


You must understand and define the business problem or scenario that you want your application to solve. It is
helpful to know who will be using the application and what they will be trying to accomplish. Compared to the
Microsoft Dynamics NAV Windows client, the Microsoft Dynamics NAV Web client is designed for occasional
users who typically need an overview of their daily work status and perform relatively simple or light data entry.
The Microsoft Dynamics NAV Web client does not support all the features that the Microsoft Dynamics NAV
Windows client does.

Design the Data Model


After you understand the problem that you want your application to solve, you must design the structure of the
database for your application. For more information about how to design the data model, see the following topics:
Designing Databases (SQL Server)
Database Basics (SQL Server)

Install the Development Tools


Microsoft Dynamics NAV Development Environment
You use the development environment to create objects, such as tables, pages and reports, and implement
the business logic for your application.
For more information, see How to: Install C/SIDE Development Environment.
Microsoft Dynamics NAV Windows client (optional)
There are many administration and operational tasks, such as creating profiles, setting users, and publishing
web services, which cannot be done by using the development environment. Although you can use the
Microsoft Dynamics NAV Web client for performing these tasks, it is sometimes easier and more efficient
to use the Microsoft Dynamics NAV Windows client. Also, to configure or personalize the Microsoft
Dynamics NAV Web client interface, you must use the Microsoft Dynamics NAV Windows client.
For more information, see Client Option.
Microsoft Dynamics NAV Server Administration tool (optional)
The Microsoft Dynamics NAV Server Administration tool is a Microsoft Management Console (MMC )
snap-in that you can use to manage the Microsoft Dynamics NAV Server instance that is used by the
Microsoft Dynamics NAV Web client.
For more information, see Microsoft Dynamics NAV Server Administration Tool.

Create Microsoft Dynamics NAV Objects


The development experience for the Microsoft Dynamics NAV Web client application is like Microsoft Dynamics
NAV Windows client. You use the Microsoft Dynamics NAV Development Environment to create Dynamics NAV
objects to support the logic for the business scenario. Some of the major tasks include the following:
Creating table objects in Dynamics NAV to implement the design of your database.
Creating pages for entering and retrieving data.
Creating reports for viewing and presenting data.
Writing C/AL code on object triggers to perform runtime operations.
As you develop Microsoft Dynamics NAV Web client applications, you should consider the following
factors.
The same objects can be used in the Microsoft Dynamics NAV Windows client and the Microsoft Dynamics
NAV Web client.
The Microsoft Dynamics NAV Web client supports most of the features that the Microsoft Dynamics NAV
Windows client supports, but there are some exceptions and limitations, which you must consider in your
design. For more information, see Feature Limitations of the Microsoft Dynamics NAV Web Client.
Do you want your solution to be available on Microsoft Dynamics NAV Tablet client and Microsoft
Dynamics NAV Phone client as well? For more information, see Developing for the Microsoft Dynamics
NAV Universal App.
For more information about how to develop Dynamics NAV objects for Microsoft Dynamics NAV Web
client applications, see Development.
Follow the Microsoft Dynamics NAV User Experience Guidelines
The Dynamics NAV User Experience guidelines can help you develop high quality and consistent applications. The
guidelines provide answers to specific user experience issues, such as determining which page type to use or
which components to include on a page. You can use the guidelines to design new application or improve existing
ones.
For more information, see Microsoft Dynamics NAV User Experience Guidelines in the MSDN Library.

Create Users and Grant Permissions to Objects


Like the Microsoft Dynamics NAV Windows client, you restrict access to Dynamics NAV data by creating users in
Dynamics NAV and applying permission sets that grant access to Dynamics NAV objects, such as pages and
reports. You do not have to create separate user accounts for the Microsoft Dynamics NAV Web client and
Microsoft Dynamics NAV Windows client. The same permission sets are applied to the user in both clients.
For more information, see Managing Users and Managing Permissions and Permission Sets.

Create Profiles and Assign Users


Profiles are collections of Dynamics NAV users who share the same Role Center. You create a profile and then
assign users to the profile. The profile is applied to the user in all clients.
For more information, see Profiles and Role Centers.

See Also
Deploying the Microsoft Dynamics NAV Web Server Components
Application Design Overview
Accessibility Features of Microsoft Dynamics NAV Windows Client
Developing for the Microsoft Dynamics NAV
Universal App
1/2/2018 • 1 min to read • Edit Online

The Microsoft Dynamics NAV Universal App is targeted at users in small and medium sized businesses that want
to access data from a tablet or a phone. This section describes how to develop for the Microsoft Dynamics NAV
Universal App.
The following list provides an overview of developing for the Microsoft Dynamics NAV Universal App.
Introducing the Microsoft Dynamics NAV Universal App
Deciding on Your Tablet and Phone Strategy
Getting Started Developing for the Microsoft Dynamics NAV Universal App
Designing for Different Screen Sizes on Tablet and Phone
Differences and Limitations When Developing Pages for the Microsoft Dynamics NAV Universal App
Using HTTPS and Certificates
How to: Implement the Camera in C/AL
How to: Implement Location in C/AL
How to: Display Data as Bricks
Defining Action Scope for Microsoft Dynamics NAV Pages
How to: Open the Microsoft Dynamics NAV Tablet or Phone Client from a Browser
Linking to the Microsoft Dynamics NAV Universal App
Walkthrough: Developing a Sales Rep Role Center for the Microsoft Dynamics NAV Tablet Client
Adding Help to the Microsoft Dynamics NAV Universal App
Troubleshooting the Microsoft Dynamics NAV Universal App

See Also
Development
Customizing Dynamics 365 for Sales and Dynamics
NAV Integration
1/2/2018 • 1 min to read • Edit Online

If you have a customer relationship solution that is based on Microsoft Dynamics 365 for Sales, then you can
integrate it with Dynamics NAV. This enables you to integrate and synchronize data in Microsoft Dynamics 365 for
Sales entities such as accounts, contacts, and products, with equivalent record types in Dynamics NAV such as
customers, contacts, and items, respectively.
Dynamics NAV has a default integration setup that you can install and enable. The default integration setup
integrates several Microsoft Dynamics 365 for Sales entities with Dynamics NAV out-of-the-box. The default
integration setup includes several objects in the Dynamics NAV database that are used to support the integration.
After you install the default integration setup, you can modify these objects to expand the integration to additional
Microsoft Dynamics 365 for Sales entities and corresponding Dynamics NAV record types.
Use the following table to understand and get started with customizing your Microsoft Dynamics 365 for Sales
integration.

TO SEE

Get an overview of the basic concepts behind Microsoft Integration Concepts and Terminology
Dynamics 365 for Sales.

Learn about which Microsoft Dynamics 365 for Sales entities Integrating Dynamics 365 for Sales in Dynamics NAV
are integrated with Dynamics NAV by default, and get an
overview of the integration features.

Install and enable the default Microsoft Dynamics 365 for Setting Up Dynamics 365 for Sales Integration in Dynamics
Sales integration. NAV

Get an overview of customizing Microsoft Dynamics 365 for Introduction to Dynamics 365 for Sales Integration
Sales integration to include additional Microsoft Dynamics 365 Customization in Dynamics NAV
for Sales entities.

Understand mapping limitations for option values in Microsoft [Handling Missing Option Values in Mapping](Handling
Dynamics 365 for Sales and learn how to make simple Missing Option Values in Mapping.md)
extensions to enable missing option values in automatic
synchronization.

Follow a step-by-step example that illustrates how to Walkthrough: Customizing Dynamics 365 for Sales Integration
customize integration. in Dynamics NAV

Understand what features and tasks are available to end- Managing Customers and Sales Created in Dynamics 365 for
users. Sales
Multilanguage Development in Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

Dynamics NAV is multilanguage enabled, which means that you can display the user interface (UI) in different
languages.
A multilanguage version of Dynamics NAV is not the same as a localized version.
A localized version is a version that is adapted to a local market. All text that is displayed to the user is
translated into the local language, and all functional areas are adapted to the requirements of the local
market. For example, the Canadian version of Dynamics NAV has additional local functionality that applies
to the Canadian market.
A multilanguage version is a localized version that you can run in different languages, but all local
functionality remains the same. For example, you can run the Canadian version of Dynamics NAV in both
English and French, but it is still the Canadian localized version. It does not contain the same local
functionality as the French localized version.
To be able to run a localized version in multiple languages, you must install language modules.

Installing Language Modules


You can install language modules so that you can view text in the user interface in different languages. Once you
have installed a language module, you can select that language on the Select Language page in the UI to change
the language of all text that is displayed in the UI in captions for text boxes, on command buttons, in menus, and so
on.

NOTE
When you change the language of Dynamics NAV, you are not changing the language of the data that is stored in Dynamics
NAV. Changing the text that is stored as application data is not part of the language modules. Examples of such text are the
names of items in the inventory or the comments for a customer.

For more information, see Language Modules.

Developing Multilanguage Applications


After you install a language module, you must design your application to take advantage of the multilanguage
functionality. For more information, see Developing Multilanguage-Enabled Applications.

Viewing the Application in Different Languages


The language that is displayed to end users in the application depends on several factors, including the language
on the localized version of the application, whether a user has specified a global language, whether a developer has
specified a global language in C/AL code, or whether a developer has specified a language for a particular object in
C/AL code. For more information, see Viewing the Application in Different Languages.

See Also
Development
Adding Languages to Microsoft Dynamics NAV
Language Modules
Developing Multilanguage-Enabled Applications
Viewing the Application in Different Languages
Instrumenting an Application for Telemetry
3/7/2018 • 4 min to read • Edit Online

This article describes how you can implement custom telemetry trace events in your application for collecting
telemetry data. This data can then be collected and visualized for analyzing the application against the desired
business goals, trobleshooting, and more.

Telemetry overview
One aspect of event logging is collecting data about how the application and your deployment infrastructure is
working in order to diagnose conditions and troubleshoot problems that affect operation and performance. For
example, this type of event logging includes Microsoft Dynamics NAV Server events and trace events like SQL
and AL function traces.
Another aspect of event logging is telemetry, which is collecting data about how your application functions and
how it is being used in production. Telemetry can tell you about specific activities that users perform within the
application in the production enviroment. Telemetry is also useful tool for troubleshooting, especially instances
where you are not able to reproduce the conditions experienced by the user or have no access to the user's
environment. Telemetry can be divided into different levels or categories, like: telemetry for engineering, telemetry
about the business, telemetry for customers
By default, the Dynamics NAV application is instrumented to emit several system telemetry trace events that are
recorded in the event log. Custom telemetry trace events enable you to send telemetry data from anywhere in the
application code.

Creating custom telemetry events


To create a custom telemetry event, you use the SENDTRACETAG function in C/AL code. You can use the
SENDTRACETAG function in any object, trigger or function. The SENDTRACETAG function has the following
syntax:

SENDTRACETAG(Tag, Category, Verbosity, Message)

You use the parameters to define the information about the telemetry trace event. This information is can be
consumed by event logging tools, and presented in different ways.

PARAMETER DESCRIPTION

Tag A text string that assigns an identifier to the telemetry trace


event. The tag can consist of letters, numbers, and special
characters. Dynamics NAV system telemetry events use an
auto-generated, auto-incremented, 7-character tag that
includes numbers and letters, such as 000002Q. and 000013P.
Try to make your tags unique from these telemetry event
tags by, for example, using at least 8 characters or a prefix, like
Cronus-0001 and Cronus-0002.

Category A text string that assigns the telemetry trace event to a


category that you define. For example, you could have a
category for upgrading, user activity, or reporting.
PARAMETER DESCRIPTION

Verbosity An enumeration that specifies the severity level of the


telemetry trace event. The value can be Critical, Error,
Warning, Normal, or Verbose. This severity level can be used
by Microsoft Dynamics NAV Server to filter out lower-level
telemetry trace events from being emitted. See Viewing and
collecting telemetry data.

Message A text string that specifies the descriptive message for the
telemetry trace event.

For example, the following code creates simple telemetry trace events for the five different severity levels.

SENDTRACETAG('Cronus-0001', 'Action', VERBOSITY::Critical, 'This is a critical message.');


SENDTRACETAG('Cronus-0002', 'Action', VERBOSITY::Error, 'This is an error message.');
SENDTRACETAG('Cronus-0003', 'Action', VERBOSITY::Warning, 'This is a warning message.');
SENDTRACETAG('Cronus-0004', 'Action', VERBOSITY::Normal, 'This is an informational message.');
SENDTRACETAG('Cronus-0005', 'Action', VERBOSITY::Verbose, 'This is a verbose message.');

For a simple test of this code, add it to the OnRun trigger of a codeunit, and then run the codeunit. Of course, you
can also call the code from other objects, triggers or functions as well.

Viewing and collecting telemetry data


Viewing and collecting telemetry data is done the same way as with other trace events emitted by Dynamics NAV,
for example, by using tools like Event Viewer, Performance Monitor, PerfView, or logman.
In Event Viewer, telemetry trace events can be viewed from Applications and Services Logs, in the
Microsoft > DynamicsNAV > Common folder. The custom telemetry trace events are recorded in the
Admin folder. You should be aware that only events with severity level of Warning, Error, and Critical will
appear.
For more information, see Monitoring Dynamics NAV Server Events Using Event Viewer.
With other tools like Performance Monitor, PerfView, and logman, you can collect telemetry data by using
Microsoft-DynamicsNAV -Common as the event trace provider.
For more information, see Get Started Monitoring Events.

IMPORTANT
The Microsoft Dynamics NAV Server instance includes a configuration setting called Diagnostic Trace Level ( TraceLevel
in the customsettings.config file) that enables you to specify the lowest severity level of telemetry events to be recorded in
the event log, or even turn off telemetry event logging altogether. If you do not see the expected events, then verify the
Microsoft Dynamics NAV Server instance configuration with an administrator. For information, see Configuring Microsoft
Dynamics NAV Server.

See Also
Monitoring Dynamics NAV Server Events
Development in C/AL
Classifying Data in Dynamics NAV
4/26/2018 • 5 min to read • Edit Online

Dynamics NAV includes development features for tagging business data with specific classifications. Specifically,
this includes data that is stored in table fields of the database and telemetry data that is emitted from the
application.

About Data Classification


Classifying data serves different purposes. It can make data easier and more efficient to locate and retrieve, and
also help to add another layer of protection and security for handling private and sensitive data. It can supplement
your process for making the application compliant with legislative and regulatory requirements for collecting,
storing, and using personal information.

NOTE
You should consider the data classification features offered in Dynamics NAV as the first layer of classification - done by
developers (Dynamics NAV and partners) on customizations, add-ons, and extensions. The second layer is the users and how
they handle data they provide and that is made available to them.

What are the different data classifications?


The following table describes the different classifications that you can apply to data:

DATA CLASSIFICATION DESCRIPTION EXAMPLE

CustomerContent Content directly provided/created by Customer generated BLOB or


admins and users. structured storage data
Customer-owned/provided
secrets (passwords, certificates,
encryption keys, storage keys)

EndUserIdentifiableInformation (EUII) Data that identifies or could be User name or display name
used to identify the user of a Microsoft (DOMAIN\UserName)
service. EUII does not contain Customer User principle name
content. (name@company.com)
User-specific IP address

AccountData Customer billing information and Tenant administrator contact


payment instrument information, information (for example, tenant
including administrator contact administrator’s name, address,
information, such as tenant e-mail address, phone number)
administrator’s name, address, or phone Customer’s provisioning
number. information
DATA CLASSIFICATION DESCRIPTION EXAMPLE

EndUsePseudonymousIdentifiers (EUPI) An identifier created by Microsoft User GUIDs, PUIDs, or SIDs


tied to the user of a Microsoft service. Session IDs
When EUPI is combined with other
information, such as a mapping table, it
identifies the end user. EUPI does not
contain information uploaded or created
by the customer (Customer content or
EUII)

OrganizationIdentifiableInformation (OII) Data that can be used to identify a Tenant ID (non-GUID)


tenant, generally config or usage data. Domain name in e-mail address
This data is not linkable to a user and (xxx@contoso.com) or other
does not contain Customer content. tenant-specific domain
information

SystemMetadata Data generated while running the Database table names, database
service or program that is not linkable column names, entity names
to a user or tenant.

Classifying data in tables and fields


Table objects and field controls include the DataClassification property that you can use to tag data with one of
the classifications previously described.
Dynamics NAV operates with some standard rules for classification:
When you add a new field to a table, the field is assigned an initial value of ToBeClassified.
FlowField and FlowFilter fields are automatically set to the SystemMetadata data classification. This cannot be
changed.
Existing tables and fields (except for FlowFields and FlowFilters) in an application that has been upgraded from
a Dynamics NAV version without the DataClassification property, will automatically be assigned the
CustomerContent classification.

IMPORTANT
Microsoft is providing this DataClassification property as a matter of convenience only. It's your responsibility to classify the
data appropriately and comply with any laws and regulations that are applicable to you. Microsoft disclaims all responsibility
towards any claims related to your classification of the data.

For more information about this property, see DataClassification Property in C/AL.
Data classification on upgrade
When you upgrade an application from a Dynamics NAV version that does not contain the DataClassification
property, existing tables and fields (except for FlowFields and FlowFilters) will automatically be assigned the
CustomerContent classification. You can then access the DataClassification property on these tables and fields,
and change the classification as needed. FlowFields and FlowFilters will be assigned the SystemMetadata
classification automatically.
Bulk-classifying data
The Field Data Classification report, which is described in the Viewing current field classifications section in this
topic, provides an overview of the data classifications for fields. The report also lets you assign data classifications
for more than one field. For example, this is useful if you are assigning classifications for the first time, or have
changed several fields and want to update their classifications. You can bulk-edit classifications only for fields in
CSIDE. The script does not update fields in extensions.
To bulk-edit classifications, export the report to Excel, update the classifications, and then save your changes. Then,
in Windows PowerShell, run the following commands to run the Import-Module script and set the classifications
on the fields.
To run the script from the default folder on the DVD, run:

Import-Module WindowsPowerShellScripts\DataClassification\DataClassification.psm1

To update the DataClassification property, run the following command. Replace <FilePath> with the full path to the
client files. For example, C:\Program Files\Microsoft Dynamics NAV\110\RoleTailored Client.

Set-FieldDataClassificationFromExcelFile -ExcelFilePath "C:\NAV\W1 Fields (Main).xlsx" -SheetName 'Field Data


Classification' -RTCFolder "<FilePath>" -DBName Navision_NAV2 -OutputFolder C:\Nav2\Classifications

Viewing current field classifications


To view the data classification on all fields, you can do one of the following:
From Microsoft Dynamics NAV Development Environment, in the Tools menu, select Show Field Data
Classification.
From the client, search for and open the Field Data Classification page.
Create a page that has the virtual table Field (ID 2000000041) as its source, and open the page in the client.
To view the data classification on all tables, create a page that has the virtual table Table Metadata (ID
2000000136) as its source, and open the page in the client.

See Also
How to: Create a Page to View a Virtual Table
Transparent Data Encryption (TDE )
Testing the Application
1/2/2018 • 6 min to read • Edit Online

Before you release your Dynamics NAV application, you must test its functionality. Testing is an iterative process. It
is important to create repeatable tests, and it is helpful to create tests that can be automated. This topic describes
the features in Microsoft Dynamics NAV 2018 that help you test the business logic in your application and some
best practices for testing your Dynamics NAV application.

Test Features
Microsoft Dynamics NAV 2018 includes the following features to help you test your application:
Test codeunits
Test runner codeunits
Test pages
UI handlers
ASSERTERROR statement
Test with permission sets
For more information, see Testing with Permission Sets.
Test Codeunits
You write test functions as C/AL code in the test codeunits. When a test codeunit runs, it executes the OnRun
function, and then executes each test function in the codeunit. By default, each test function runs in a separate
database transaction, but you can use the TransactionModel Property on test functions and the TestIsolation
Property on test runner codeunits to control the transactional behavior. By default, the results of a test codeunit are
displayed in a message window, but you can use the OnAfterTestRun Trigger on a test runner codeunit to capture
the results. The outcome of a test function is either SUCCESS or FAILURE. If any error is raised by either the code
that is being tested or the test code, then the outcome is FAILURE and the error is included in the results log file.
Even if the outcome of one test function is FAILURE, the next test functions are still executed.
The functions in a test codeunit are one of the following types:
Test function
Handler function
Normal function
For more information, see How to: Create Test Codeunits and Test Functions.
Test Runner Codeunits
You use test runner codeunits to manage the execution of test codeunits and to integrate with other test
management, execution, and reporting frameworks. By integrating with a test management framework, you can
automate your tests and enable them to run unattended.
Test runner codeunits include the following triggers:
OnBeforeTestRun Trigger
OnAfterTestRun Trigger
You can use these triggers to perform preprocessing and postprocessing, such as initialization or logging
test results. If you implement the OnBeforeTestRun trigger, then it executes before each test function
executes. If you implement the OnAfterTestRun trigger, then it executes after each test function executes
and also suppresses the automatic display of the results message.

NOTE
The OnBeforeTestRun and OnAfterTestRun triggers are optional. By default, they are not available on a test runner
codeunit. To implement these triggers, you must manually add them as functions and you must specify the correct signature.

WARNING
The OnBeforeTestRun and OnAfterTestRun triggers always run in their own transactions, regardless of the value of the
TestIsolation Property, the value of the TransactionModel Property, or the outcome of a test function.

For more information, see How to: Create a Test Runner Codeunit.
Test Pages
Test pages mimic actual pages but do not present any UI on a client computer. Test pages let you test the code on a
page by using C/AL to simulate user interaction with the page.
There are two types of test pages:
TestPage, which is a regular page and can be any kind of page. This includes page parts or subpages.
TestRequestPage, which represents the request page on a report.
You can access the fields on a page and the properties of a page or a field by using the dot notation. You can
open and close test pages, perform actions on the test page, and navigate around the test page by using
C/AL functions. For more information, see Testing Pages.
UI Handlers
To create tests that can be automated, you must handle cases when user interaction is requested by code that is
being tested. UI handlers run instead of the requested UI. UI handlers provide the same exit state as the UI. For
example, a test function that has a FunctionType of ConfirmHandler handles CONFIRM function calls. If code that
is being tested calls the CONFIRM function, then the ConfirmHandler function is called instead of the CONFIRM
function. You write code in the ConfirmHandler function to verify that the expected question is displayed by the
CONFIRM function and you write C/AL code to return the relevant reply.
The following table describes the available UI handlers.

FUNCTION TYPE PURPOSE

MessageHandler Handles MESSAGE statements.

ConfirmHandler Handles CONFIRM statements.

StrMenuHandler Handles STRMENU statements.

PageHandler Handles specific pages that are not run modally.

ModalPageHandler Handles specific pages that are run modally.


FUNCTION TYPE PURPOSE

ReportHandler Handles specific reports.

RequestPageHandler Handles the request page of a specific report.

You create a specific handler for each page that you want to handle and a specific report handler for each report
that you want to handle.
If you run a test codeunit from a test runner codeunit, then any unhandled UI in the test functions of the test
codeunit causes a failure of the test. If you do not run the test codeunit from a test runner codeunit, then any
unhandled UI is displayed as it typically would.
For more information, see How to: Create Handler Functions.
ASSERTERROR Keyword
When you test your application, you should test that your code performs as expected under both successful and
failing conditions. These are called positive and negative tests. To test how your application performs under failing
conditions, you can use the ASSERTERROR keyword. The ASSERTERROR keyword specifies that an error is
expected at run time in the statement that follows the ASSERTERROR keyword. If a simple or compound
statement that follows the ASSERTERROR keyword causes an error, then execution successfully continues to the
next statement in the test function. If a statement that follows the ASSERTERROR keyword does not cause an
error, then the ASSERTERROR statement itself fails with an error, and the test function that is running produces a
FAILURE result.
For more information, see C/AL ASSERTERROR Statements.

Testing Best Practices


We recommend the following best practices for designing your application tests:
Test code should be kept separate from the code that is being tested. That way, you can release the tested
code to a production environment without releasing the test code.
Test code should test that the code being tested works as intended both under successful and failing
conditions. These are called positive and negative tests. The positive tests validate that the code being tested
works as intended under successful conditions. The negative tests validate that the code being tested work
as intended under failing conditions.
1. In positive tests, the test function should validate the results of application calls, such as return values,
state changes, or database transactions.
2. In negative tests, the test function should validate that the intended errors occur, error messages are
presented, and the data has the expected values.
Automated tests should not require user intervention.
Tests should leave the system in the same well-known state as when the test started so that you can re-run
the test or run other tests in any order and always start from the same state.
Test execution and reporting should be fast and able to integrate with the test management system so that
the tests can be used as check-in tests or other build verification tests, which typically run on unattended
servers.
Create test functions that follow the same pattern:
1. Initialize and set up the conditions for the test.
2. Invoke the business logic that you want to test.
3. Validate that the business logic performed as expected.
Only use hardcoded values in tests when you really need it. For all other data, consider using random data.
For example, you want to test the Ext. Doc. No. Mandatory field in the Purchases & Payables Setup
table. To do this you need to create and post typical purchase invoice. The typical purchase invoice line
specifies an amount. For most tests, it does not matter exactly what amount. For inspiration, see the use of
the GenerateRandomCode function in the tests that are included in the TestToolkit folder on the Dynamics
NAV product media. For more information, see Random Test Data.
Monitor code coverage. For more information, see Code Coverage.

See Also
Application Test Automation
Testing Pages
How to: Run Automated ApplicationTests
Walkthrough: Testing Purchase Invoice Discounts
Walkthrough: Create a Test with Confirmation Dialog
Random Test Data
Debugging
1/2/2018 • 3 min to read • Edit Online

The process of finding and correcting errors is called debugging. Microsoft Dynamics NAV 2018 provides an
integrated debugger to help you inspect your code to verify that your application can run as expected. The
debugger UI runs in the Microsoft Dynamics NAV Windows client or the Microsoft Dynamics NAV Web client.
The debugger services run on the computer that is running Microsoft Dynamics NAV Server.
For a tour of the new Dynamics NAV Debugger, see Walkthrough: Debugging the Microsoft Dynamics NAV
Windows Client.

NOTE
In Microsoft Dynamics NAV 2009, you used Visual Studio to debug objects on the computer that is running Microsoft
Dynamics NAV Server, and you used the Dynamics NAV Debugger to debug objects running on the Classic client. You cannot
use Visual Studio to debug objects on the computer that is running Microsoft Dynamics NAV Server in Microsoft Dynamics
NAV 2018. Instead, you use the new Dynamics NAV Debugger.

Business Sessions
To start debugging, you attach the debugger to a business session. The business session that you select can be any
of the following:
Microsoft Dynamics NAV Windows client session.
Microsoft Dynamics NAV Web client session.
OData web services session.
SOAP web services session.
NAS services session.
Background session that you start by using the STARTSESSION Function (Sessions).
After you attach the debugger, program flow runs until it reaches a breakpoint.
The remaining unattached business sessions continue to run without interruption.
For more information, see Activating the Debugger.

Breakpoints
The basic concept in debugging is the breakpoint, which is a mark that you set on a statement. When the program
flow reaches the breakpoint, the debugger stops execution until you instruct it to continue. Without any
breakpoints, the code runs without interruption when the debugger is active. For more information, see
Breakpoints.

Debugging Requirements
To use the Dynamics NAV debugger, the user who is logged in must be assigned the SUPER permission set for all
companies. To assign the permission set for all companies, on the User Card page, under User Permission Sets,
leave the Company column blank. If you assign the SUPER permission set for a specific company, then you get an
error that you must be a member of the SUPER user role. For more information, see How to: Define Permissions
for Users.
Assigning the SUPER permission set for all companies is required because a user who is debugging has access to
business data in the debugged session.

IMPORTANT
If you want to debug code that contains multiple INSERT statements, we recommend that you disable bulk inserts. If a loop
with multiple INSERT statements is being buffered for a bulk insert, the Dynamics NAV debugger cannot step through that
code. If you disable bulk inserts, the debugger will step through the code as expected. For more information, see Bulk Inserts
and Configuring Microsoft Dynamics NAV Server.

Disabling Debugging
If you do not want any user to be able to debug sessions on Microsoft Dynamics NAV Server, then you must
disable debugging. This is useful if you have concerns about how to allow your data to be seen through the
debugger. For more information, see How to: Disable Debugging.

Troubleshooting Protocol Mismatch Errors


We recommend that you do not use the settings parameter when you start a Microsoft Dynamics NAV Windows
client if you later want to use that Microsoft Dynamics NAV Windows client to start the debugger. When you start
the debugger from Sessions page, it uses some information from the default ClientUserSettings.config file, not the
config file that you specified with the settings parameter when you started the Microsoft Dynamics NAV Windows
client. There can be differences in the connection properties, which causes a protocol mismatch error.
For more information about the settings parameter, see Starting the Windows Client at the Command Prompt.

See Also
Walkthrough: Debugging the Microsoft Dynamics NAV Windows Client
Avoiding Run-Time Errors
Using About This Page and About This Report
Comparing and Merging Application Object Source
Files
1/2/2018 • 7 min to read • Edit Online

When you create or modify application objects, you use the Microsoft Dynamics NAV Development Environment,
and you import and export objects as .fob files. But you can also export objects as text files and use other tools,
such as the Microsoft Dynamics NAV Development Shell, to make general changes to the objects. For example,
you can use Windows PowerShell cmdlets to merge changes from an upgrade with your Dynamics NAV solution.
You can export all application objects to a single text file. Optionally, you can split the large text file into separate
text files for each application object. You can also use an external source control system to store the text files, such
as Visual Studio Team Foundation Server, but this is not required by the Dynamics NAV cmdlets.
The application merge utilities that are available in the Microsoft Dynamics NAV Development Shell install when
you choose the Developer option in Microsoft Dynamics NAV 2017 Setup, or if you add the development
environment to another installation option.

Comparing and Merging Application Objects


Dynamics NAV includes Windows PowerShell cmdlets that help you apply changes to Dynamics NAV solutions.
You can use Dynamics NAV cmdlets to modify application object source files in the Microsoft Dynamics NAV
Development Shell, or by importing the Microsoft.Dynamics.NAV.Model.Tools.psd1 module into the Windows
PowerShell Integrated Scripting Environment (ISE ).
When Microsoft releases a new version of Dynamics NAV, you want to upgrade your solution. Similarly, you want
to update your solution with cumulative updates and other smaller changes to the application. Each time you want
to update your solution, you have to compare the original version to the new version, and then you have to apply
the difference to your own solution. Or you compare the new version to your own solution and merge the changes
into your solution. In both cases, you compare different versions of application objects to calculate and apply the
difference. The Merge-NAVApplicationObject cmdlet compares the changes that have been made to application
objects between two sets of Dynamics NAV application objects, and applies the difference to a third set of
application objects, the target of the merge. The result of the application object merge is a fourth set of application
objects that make up your new, updated solution.
In the Microsoft Dynamics NAV Development Shell, you can also use other Windows PowerShell cmdlets that
help you with manage application object files. But the recommended way to update your application is to use the
Merge-NAVApplicationObject cmdlet. The other option is a two-step process using the Compare-
NAVApplicationObject and Update-NAVApplicationObject cmdlets.
You can use the application merge utilities to merge and update the following application object types:
Tables
Pages
Reports
Codeunits
MenuSuites
Queries
XMLPorts
You cannot use the cmdlets to modify dataports, forms, or reports with classic report sections. Also, some
parts of some object types require special attention from the tool or from you as described in the following
list:
Application object properties
Each of the application object properties in the application object files often calls for hands-on handling. The
text files specify the Modified, Date, Time, and VersionList properties for each object. When you run the
Merge-NAVApplicationObject cmdlet, you can set parameters that are specific for application object
properties. But two cmdlets are available specifically for post-processing of object properties: Get-
NAVApplicationObjectProperty and Set-NAVApplicationObjectProperty.
Often handling or setting application object properties is done at a later time than the merge itself. For
example, you run the merge, resolve the conflicts, and once you are done, you want to stamp the current
date and time on all objects. To do that, use the Set-NAVApplicationObjectProperty cmdlet to change the
values of the Version List, Date, Time, or Modified properties in the specified text files. You can use the Set-
NAVApplicationObjectProperty cmdlet to extract information about the application objects before you
change them.
Documentation triggers
In each object, the documentation trigger is used for many different purposes. Documentation, of course,
but also for tracking changes with date or history semantics built into it. You can use the cmdlets to modify
the contents of the documentation section. If you want to be explicit about how the content of the
documentation triggers is merged, you can set the -DocumentationConflict parameter when you run the
Merge-NAVApplicationObject cmdlet. Set this parameter when you are merging objects with the same type
of content in the documentation trigger, such as technical descriptions or a version list. By default, conflicting
lines of documentation are merged into the result file with the content from the modified object listed first.
This is particularly useful when the objects contain version history in the documentation triggers.
ControlID
Sometimes, developers in-house or external partners create objects in the same ID range as you. This
surfaces in the merge process as conflicts and hence as work to do. The application merge utilities provide
ways to handle that, depending on your needs and requirements. To reduce noise, by default the Merge-
NAVApplicationObject cmdlet suppresses conflicting modifications on non-functional incidents such as the
ordering of variables and methods that are sometimes referred to as control IDs. If you set the–Strict
parameter, these occurrences are treated like any other conflicts and reported accordingly.Significant IDs,
such as table and field IDs, are fully considered during compare and merge.
CaptionML
Captions are an integral part of the solution, but when you compare two versions of the same object with
two different languages, you will see extensive differences. You can choose to export captions into text files
before you compare or merge application objects. For example, you can use the Export-
NAVApplicationObjectLanguageWindows PowerShell cmdlet to export specific languages from the objects
before you merge them. You can then use the Import-NAVApplicationObjectLanguage cmdlet to import the
captions after the merge. Other Windows PowerShell cmdlets support joining and splitting application
object language files.
When you merge application changes by running the Merge-NAVApplicationObject cmdlet or the Update-
NAVApplicationObject cmdlet, the differences are applied automatically if possible. However, when conflicts
are detected, they are captured in CONFLICT files that clearly identify where two parties such as you and
Microsoft have changed the same object or parts of it. For more information, see Handling Merge Conflicts.
Scenario: Updating your Solution to the Next Cumulative Update
In the following example, you have built a solution that is based on Microsoft Dynamics NAV 2018, MySolution.
Microsoft then releases Microsoft Dynamics NAV 2018 Cumulative Update 1 that includes hotfixes and two
regulatory features for your country/region. To help you apply the cumulative update to your solution, you use the
Dynamics NAV cmdlets. The cmdlets calculate the modifications that Microsoft made between the original release
and the cumulative update, and apply these to your solution. Then, you must manually resolve any conflicts, such
as both you and Microsoft modified a report object or a table. You must also validate the automatically applied
modifications through testing and maybe code review. The following table describes the three versions of the
Dynamics NAV application that you want to compare and merge.

VERSION DESCRIPTION

ORIGINAL The baseline of the application merge. For example, the


Microsoft release of Microsoft Dynamics NAV 2018.

MODIFIED The updated version of the original. For example, this can be
Microsoft Dynamics NAV 2018 Cumulative Update 1.
Alternatively, it can be a small add-on.

In many cases, the modified application is the version that


contains fewer changes to the original than the version that is
the target of the merge. This is because you want to apply
fewer changes to a large application rather than applying a
large change to a small application.

TARGET The version of the application that you want to apply the
difference between the original and the modified application
to. For example, this can be your solution that you want to
apply a cumulative update to. Alternatively, it can be a new
major release from Microsoft that you want to apply your
modified solution to.

The Dynamics NAV cmdlets calculate the modifications made from ORIGINAL to MODIFIED, capture these, and
then apply automatically as many as possible to the TARGET application. The resulting application is stored in a
RESULT folder. Some application objects cannot be merged automatically; these conflicts are described in
separate text files that you can analyze for further processing.

TIP
The use of TARGET as the name of the folder in the sample scripts and in the –TargetPath cmdlet parameters indicates the
most common direction of the merge: You apply external modifications to a target solution. However, there are scenarios
where it makes sense to swap the versions that you specify as MODIFIED and TARGET, such as when you upgrade from
version to version. Since the processing is so fast, typically just a few minutes, it is recommended that you try out both
options. For the smoother experience, place the set of application objects with the fewest modifications in MODIFIED.

See Also
How to: Merge Application Changes
How to: Compare and Update Application Object Source Files
Handling Merge Conflicts
Merging Application Objects using the Example Scripts
Working with Application Objects as Text Files
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Technical Reference
1/2/2018 • 1 min to read • Edit Online

This section provides reference information for Dynamics NAV objects. For more reference information, see
C/SIDE Reference Guide.

See Also
C/SIDE Reference Guide
Object Specifications and Limitations
Special Tables
Development Environment (C/SIDE )
Development Environment Commands
Administration Cmdlets for Microsoft Dynamics NAV
Development Cmdlets for Microsoft Dynamics NAV
Development Cmdlets for Microsoft Dynamics NAV Extensions
Administration Cmdlets for Microsoft Dynamics NAV Extensions
C/SIDE Reference Guide
1/2/2018 • 1 min to read • Edit Online

This section describes all functions, data types, properties, and triggers in Dynamics NAV. They also provide
general descriptions of some of the features and functionality that Dynamics NAV supports.
In the Table of Contents, all C/AL Functions are grouped alphabetically according to the data type that they
support or according to a category. Each data type topic contains a description of the data type.
Properties and Triggers are also listed alphabetically.
For more information about the Microsoft Dynamics NAV Development Environment, see Development.

In This Section
C/AL Functions
Properties
Triggers

See Also
Development Environment Commands
Technical Reference
Object Specifications and Limitations
1/2/2018 • 1 min to read • Edit Online

This topic describes the specifications and limitations for the database and application objects.

Specifications for the Database


The following characteristics are based on maximum capacity specifications for SQL Server 2017. Please visit the
link below to see specifications for previous versions of SQL Server.

FEATURE CHARACTERISTIC

Maximum number of physical disk files 32,767

Database file size 524,272 terabytes

Maximum number of objects in a database 2,147,483,647

Maximum number of characters in application object names 30

Maximum number of characters in a Database Authentication 80


password

Specifications for Tables


The following characteristics are based on maximum capacity specifications for SQL Server 2017. Please visit the
link below to see specifications for previous versions of SQL Server.

FEATURE CHARACTERISTIC

Range for table object ID numbers 1 – 999,999,999 1

Maximum number of characters in a table name 30

Maximum table size Depends on available storage

Maximum number of records in a table Depends on available storage

Maximum record size 8060 bytes

Maximum number of fields in a record 500

Range for field numbers 1 – 999,999,999

Maximum number of keys for a table 40

Maximum size of a Dynamics NAV key 900 bytes

Maximum number of distinct fields per key 16


FEATURE CHARACTERISTIC

Maximum size of an (non-key) index 1700 bytes

Maximum number of SumIndexFields per key 20

Maximum number of characters in a text or code field 250

Maximum size of a BLOB field 2 GB

Maximum number of characters in a field name 30

Specifications for Pages and Reports


FEATURE CHARACTERISTIC

Range for page or report object ID numbers 1 – 999,999,999 1

Maximum number of characters in a caption 1024

Maximum bitmap size in bitmap property 32500 bytes

Specifications for Codeunits


FEATURE CHARACTERISTIC

Range for table object ID numbers 1 – 999,999,999 1

Maximum number of characters in variable names 30

Maximum number of dimensions in array variables 10

Maximum number of elements in an array variable 1,000,000

Maximum physical size of a codeunit 2 GB

Lower bound of index in an array 1

1All application objects are identified by an ID


number. There are restrictions, however, on the numbers you can use
when you create your own application objects. Review your Partner License Agreement for more information.

See Also
Objects
Field Data Types
Maximum Capacity Specifications for SQL Server
C/AL Functions
1/2/2018 • 1 min to read • Edit Online

The C/AL functions in this section are grouped according to the data type that they support or according to a
category. Each data type topic contains a description of the data type.

See Also
Properties
Triggers
Essential C/AL Functions
Programming in C/AL
Functions Not Supported by Microsoft Dynamics
NAV Web Client
1/2/2018 • 1 min to read • Edit Online

This topic lists the C/AL functions and data types that are not supported or partially supported by Microsoft
Dynamics NAV Web client. For more information about partially supported functions, see the function topic in the
reference section.

Unsupported Functions
This section lists the functions that are not supported by the Microsoft Dynamics NAV Web client. If you use a
function that is not supported, an error occurs at runtime.
CREATE Function (Automation)
ISCLEAR Function (Automation)
ACTIVATE Function (Debugger)
UPDATE Function (Dialog)

Partially Supported Functions


This topic lists the functions that either do not have all the capabilities in the Microsoft Dynamics NAV Web client
as they do in the Microsoft Dynamics NAV Windows client or they behave differently than in the Microsoft
Dynamics NAV Windows client.
DOWNLOAD Function (File)
DOWNLOADFROMSTREAM Function (File)
HYPERLINK Function
PREVIEW Function (Report)
PRINTONLYIFDETAIL Function (Report)
REPORT.RUN Function
REPORT.RUNMODAL Function
UPLOAD Function (File)
UPLOADINTOSTREAM Function (File)
Automation Data Type in Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use the Automation data type to reference an automation server.


To use an automation server in Dynamics NAV
1. Define a variable of type Automation and give it a name.
2. Select the Subtype field, and in the Automation Object List window that opens, in the Automation
Server field, get a list of available automation servers.
3. Select a server and then choose the OK button.
In the Automation Object List the interfaces of the selected automation server are displayed.
4. Select an interface and then choose the OK button.
This procedure has selected the GUID of the automation server, the version number, and the GUID of the
interface. It is immediately evaluated into a name such as <name of server>.<name of interface>, as in the
following:

'Microsoft Excel X.0 Object Library'.Application

When you have defined an automation server as a variable, you must use CREATE Function (Automation) to create
an instance of the server. After that, you can use the server through the variable. You can browse its methods and
properties in the Symbol menu.
When you are using a server, you should know that there is not a one-to-one relationship between C/AL data types
and COM data types. For an overview of the data type mapping, see Using COM Technologies in Microsoft
Dynamics NAV.
If you use a variable of type Automation to automate Microsoft Excel and you run an English (United States)
version of Excel but the regional settings for the computer are configured for a non-English language, then you will
receive the following error:

Error: 0x80028018 (-2147647512)


Description: Old Format or Invalid Type Library

For more information, see Microsoft Help and Support article 320369: BUG: "Old format or invalid type library"
error when automating Excel.

Limitations
Automation is not supported by Microsoft Dynamics NAV Web client.
Automation objects cannot run on Microsoft Dynamics NAV Server.

See Also
CREATE Function (Automation)
ISCLEAR Function (Automation)
Variant Data Type
BigInteger Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Stores very large whole numbers that range from -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807.

Remarks
This data type is a 64-bit integer.
You must add an L to the constant definition to inform C/AL that the integer must be interpreted and treated as a
BigInteger.
If you assign -9,223,372,036,854,775,808 directly to a BigInteger variable, then you get an error when you try to
compile the code. However, you can indirectly assign -9,223,372,036,854,775,808 to a BigInteger variable by using
the following code.

BigIntegerVar := -9223372036854775807L;
BigIntegerVar := BigIntegerVar - 1;

If you try to indirectly assign a value that is smaller than -9,223,372,036,854,775,808, or larger than
9,223,372,036,854,775,807, then you get a run-time error.

Example
BI := 1L;
BI := 455500000000L;

See Also
Decimal Data Type
Integer Data Type
ABS Function (Decimal, Integer, BigInteger)
POWER Function (Decimal, Integer, BigInteger)
RANDOM Function (Integer)
RANDOMIZE Function (Integer)
ROUND Function (Decimal)
BigText Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This complex data type handles large text documents.

Remarks
This data type cannot be shown in a message window or be seen in the Debugger.
The maximum length of a BigText variable is 2,147,483,647 characters and this corresponds to 2 GB.
You can use the BigText functions to manipulate a BigText variable, for example to extract part of a BigText variable
or to add a text string to a BigText variable.
The normal string functions cannot be used with a BigText variable.

See Also
ADDTEXT Function (BigText)
GETSUBTEXT Function (BigText)
LENGTH Function (BigText)
READ Function (BigText)
TEXTPOS Function (BigText)
WRITE Function (BigText)
BLOB Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A binary large object (BLOB ) is a complex data type. Variables of this data type differ from normal numeric and
string variables in that BLOBs have a variable length.
The maximum size of a BLOB is 2 GB.

Remarks
Use BLOBs to store memos (text), pictures (bitmaps), or user-defined types.

NOTE
You cannot view text that is stored in BLOBs from the development environment.

You can read from and write to BLOBs by creating input and output streams, respectively. To do so, use
CREATEINSTREAM Function (BLOB ) and CREATEOUTSTREAM Function (BLOB ).
For more information, see InStream and OutStream Data Types.
To optimize performance, when you access a record that has a BLOB field, the data in the BLOB is not always read
into memory. You must call the CALCFIELDS Function (Record) to read the BLOB into memory and calculate it.
Then you can use the BLOB in C/AL code or display it in the application.
It is not supported to insert a BLOB field into a Variant.
It is not supported for a page to access a BLOB field from a table other than the SourceTable of the page.

Different Behavior in Versions Prior to Microsoft Dynamics NAV 2013


In product versions earlier than Microsoft Dynamics NAV 2013, if you wrote to a BLOB OutStream but did not
insert or modify the record in the database, and then called the CALCFIELDS function on the BLOB field, you
would get the value of the BLOB based on what you wrote to the OutStream, not based on what was currently in
the database.
In versions Microsoft Dynamics NAV 2013 and later, for the same scenario, you get the value of the BLOB that is in
the database. Similarly, if you call the CALCFIELDS Function on a new record that has not been inserted into the
database, then you clear the BLOB field from the record.

See Also
CREATEINSTREAM Function (BLOB )
CREATEOUTSTREAM Function (BLOB )
EXPORT Function (BLOB )
HASVALUE Function (BLOB )
Variant Data Type
Boolean Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Indicates true or false.


For usability reasons, Boolean values are sometimes shown as Yes or No. For example, the two possible values for
the InsertAllowed page property are Yes and No.

NOTE
The values that are shown are based on the regional format that is set on the computer. For example, on a computer that has
the regional format set to Danish (Denmark), the Boolean values are shown as Ja and Nej instead of Yes and No.

You can use the FORMAT Function (Code, Text) to specify how Boolean values are shown.
Byte Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use this simple data type to store a single, 8-bit character as a value in the range 0 to 255. You can easily convert
this data type from a number to a character and vice versa. This means you can use mathematical operators on
Byte variables.

Example
The following example assumes that you have a Byte variable named B and a Text variable named S.
You can assign a constant string of the length 1 to a Byte variable, as shown in the first line of the following code
example.
You can assign a single character in a Text or Code variable to a Byte variable, as shown in the second line of the
following code example.
You can assign a numeric value to a Byte variable, as shown in the third line of the following code example. This
causes the Byte variable to contain the character from the ASCII character set that corresponds to the numeric
ASCII code.

B := 'A';
B := S[2];
B := 65;

You cannot assign a character to a position greater than the position of the null terminator. For example, if the value
of the text variable MyText is 'abc', then the null terminator is at position 4 and the following assignment causes a
run-time error to occur.

MyText[5] := 'e';

See Also
Text Data Type
Code Data Type
Byte Data Type
Char Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use this simple data type to store a single, 16-bit character as a value in the range 0 to 65535. You can convert this
data type from a number to a character and vice versa. This means you can use mathematical operators on Char
variables.

Example
The following example assumes that you have a Char variable named C and a Text or Code variable named S.
You can assign a constant string of the length 1 to a Char variable, as shown in the first line of the following code
example.
You can assign a single Char in a Text or Code variable to a Char variable, as shown in the second line of the
following code example.
You can assign a numeric value to a Char variable, as shown in the third line of the following code example.
A Char variable represents Unicode characters in the same way as the .NET Framework Char structure. For more
information about the .NET Framework Char structure, see Char Structure.

C := 'A';
C := S[2];
C := 65;

You cannot assign a Char to a position greater than the position of the null terminator. For example, if the value of
the Text variable MyText is 'abc', then the null terminator is at position 4 and the following assignment causes a
run-time error to occur.

MyText[5] := 'e';

See Also
Text Data Type
Code Data Type
Byte Data Type
Code Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This simple data type denotes a special type of string that is converted to uppercase and removes any trailing or
leading spaces.

Remarks
The length of a Code variable equals the number of characters in the text without leading or trailing spaces.
You must specify the length of a Code variable or field. The maximum length of a Code variable is 1024 characters.
The maximum length of a Code field in a table is 250 characters.
A Code variable cannot be null.
The Code data type supports Unicode.
You can index any character position in a string, such as A[65]. The resulting value will be a Char Data Type.
Fields that contain a date formula must not have data type Code. Instead, use the DateFormula Data Type. All
fields that contain a date formula with data type Code must be converted into data type DateFormula.
You cannot assign a char to a position in the code variable greater than the current length of the variable +1. For
more information, see Char Data Type.

Example
This example shows some typical examples of code string assignments. In these examples, assume that the
variable c is a code variable with a maximum length of 4.

c := 'ABC';
// Results in variable c, which contains 'ABC'
// and is 3 characters in length.
c := '1';
// Results in variable c, which contains '1'
// and is 1 character in length.
c := '';
// Results in variable c, which contains '' (empty string)
// and is zero (0) characters in length.
c := ' 2 ';
// Results in variable c, which contains '2'
// and is 1 character in length.

See Also
CONVERTSTR Function (Code, Text)
COPYSTR Function (Code, Text)
DELCHR Function (Code, Text)
DELSTR Function (Code, Text)
FORMAT Function (Code, Text)
INCSTR Function (Code, Text)
INSSTR Function (Code, Text)
LOWERCASE Function (Code, Text)
MAXSTRLEN Function (Code, Text)
PADSTR Function (Code, Text)
SELECTSTR Function (Code, Text)
STRCHECKSUM Function (Code, Text)
STRLEN Function (Code, Text)
STRPOS Function (Code, Text)
STRSUBSTNO Function (Code, Text)
UPPERCASE Function (Code, Text)
Codeunit Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use this complex data type to store units of C/AL code. Codeunits contain a number of user-defined functions.

See Also
Codeunit.RUN Function (Codeunit)
RUN Function (Codeunit)
Database
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


CHECKLICENSEFILE Function (Database)
COMMIT Function (Database)
COMPANYNAME Function (Database)
COPYCOMPANY Function (Database)
CURRENTTRANSACTIONTYPE Function (Database)
DATAFILEINFORMATION Function (Database)
EXPORTDATA Function (Database)
GETDEFAULTTABLECONNECTION Function (Database)
HASTABLECONNECTION Function (Database)
IMPORTDATA Function (Database)
LOCKTIMEOUT Function (Database)
REGISTERTABLECONNECTION Function (Database)
SELECTL ATESTVERSION Function (Database)
SERIALNUMBER Function (Database)
SETDEFAULTTABLECONNECTION Function (Database)
SID Function (Database)
TableConnectionType Data Type
TENANTID Function (Database)
TransactionType Data Type
UNREGISTERTABLECONNECTION Function (Database)
USERID Function (Sessions)

See Also
C/AL Functions
C/SIDE Reference Guide
Development
Dates and Times
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


Date Data Type
DateTime Data Type
Duration Data Type
Time Data Type
Date and Time Functions
DateTime Functions
Date Data Type in Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

Denotes a date ranging from January 1, 1753 to December 31, 9999.


The displayed text format of the date is determined by your Region and Language Format setting in Windows.

Undefined Dates
An undefined or blank date is specified by 0D. The undefined date is considered to be before all other dates.

Normal Dates and Closing Dates


All normal dates have a corresponding closing date. The closing date for a given date is defined as a period of time
that follows a given normal date and precedes the next normal date.
To assign a normal date to a variable, use the following format: <MMDDYY>D
To assign a closing date to a variable, use the CLOSINGDATE Function (Date).

Year Format
If the year is defined by two digits and is between 30 and 99, then it is considered to be in the 1900s. If it is
between 00 and 29, then it is considered to be in the 2000s.

Storing Dates in the SQL Server Database


SQL Server stores information about both date and time in columns of the DATETIME types. For date fields,
Dynamics NAV uses only the date and uses a constant value for the time. For a normal date, this constant value
contains 00:00:00:000. For a closing date, it contains 23:59:59:000.
The Dynamics NAV undefined date is represented by the earliest valid date in SQL Server. The earliest valid date
in SQL Server for a DATETIME is 01-01-1753 00:00:00:000.
If you store a date in the database that is outside the valid range for a SQL DATETIME, a run-time error occurs.

Example
This example shows valid assignments of Dates. It requires that you define the following variable.

VARIABLE DATATYPE

Date1 Date

This example is compiled and run on a computer with the regional format set to English (United States).

Date1 := 0D;
Date1 := 112710D;
MESSAGE(FORMAT(Date1));
Date1 := 11271810D;
MESSAGE(FORMAT(Date1));
The message window displays the following:
11/27/10
11/27/1810

NOTE
When you assign a value to a date variable, the value that you assign must be in the correct format for the regional setting
of the computer. For example, if the computer is set to English (United States), then Date1 := 271108D; results in a
compiler error.

See Also
CALCDATE Function (Date)
CLOSINGDATE Function (Date)
DATE2DMY Function (Date)
DATE2DWY Function (Date)
DATI2VARIANT Function
DMY2DATE Function (Date)
DWY2DATE Function (Date)
NORMALDATE Function (Date)
TODAY Function (Date)
VARIANT2DATE Function
WORKDATE Function (Date)
DateFormula Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use this data type to contain a date formula that has the same capabilities as an ordinary input string for the
CALCDATE Function (Date). The DateFormula data type is used to provide multilanguage capabilities to the
CALCDATE Function (Date).

Remarks
When a date calculation formula is stored in a DateFormula field, it is converted to a generic, non-language
dependent format. When a date calculation formula is retrieved from a DateFormula field, it is converted to a valid
date conversion string for the currently selected language.
To assign a value to a DateFormula data type, whether it is a field or a variable, you must use the EVALUATE
Function.

Example
This example requires that you create a DateFormulaVariable variable that is a DateFormula data type.

IF FORMAT(DateFormulaVariable) = ' ' THEN


EVALUATE(DateFormulaVariable, '1W');

You must use the FORMAT Function (Code, Text) to make a comparison with a text string. If you do not use this
function, then the IF statement will fail because you cannot compare a DateFormula data type with a Text data type.

See Also
Developing Multilanguage-Enabled Applications
DateFormula Property
DateTime Data Type in Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

Denotes a date and time ranging from January 1, 1753, 00:00:00.000 to December 31, 9999, 23:59:59.999. An
undefined or blank DateTime is specified by 0DT.
The displayed text format of a DateTime is determined by your Regional and Language Options in Windows.

Remarks
A DateTime is stored in the database as Coordinated Universal Time (UTC ). UTC is the international time standard
(formerly Greenwich Mean Time, or GMT). Zero hours UTC is midnight at 0 degrees longitude.
The DateTime is always displayed as local time in Dynamics NAV. Local time is determined by the time zone
regional settings used by your computer. You must always enter DateTimes as local time. When you enter a
DateTime as local time, it is converted to UTC using the current settings for the time zone and daylight savings
time.
The DateTime data type does not support closing dates.
By default, DateTimes are displayed using the standard display format. When you use the standard display format,
seconds and milliseconds are not displayed until you select the DateTime field. Furthermore, if you export your
data using an XMLport or by writing it to a file, the seconds and milliseconds are not exported unless you specify
that DateTime fields use another format and display this information. For more information about how DateTime
objects are displayed and the formats that are available, see Format Property.
The only constant available when you use the DateTime data type is the undefined DateTime, 0DT. To assign a
constant value to a DateTime variable you must use the CREATEDATETIME Function (DateTime).
If you use a date that is outside the valid date range, a run-time error occurs.

SQL Server
In SQL Server, the earliest permitted DateTime is January 1, 1753, 00:00:00.000. The latest permitted DateTime is
December 31, 9999, 23:59:59.999.
If you store a date in the database that is outside the valid range for a SQL DATETIME, a run-time error run-time
occurs.

Changes from Previous Versions of Microsoft Dynamics NAV


In versions earlier than Microsoft Dynamics NAV 2009, the DateTime data type denotes DateTimes ranging from
January 1, 0000, 00:00:00.000 to December 31, 9999, 23:59:59.999, and includes the undefined DateTime, 0DT.
Microsoft Dynamics NAV 2018 supports DateTimes with date January 1, 0000 as a special case for compatibility
with previous versions.
This topic has been updated to specify the SQL Server requirement for the earliest DateTime rather than the
internal Dynamics NAV DateTime. In SQL Server, the earliest DateTime is January 1, 1753, 00:00:00.000.
Dynamics NAV can handle dates as early as January 3, 0001, but such dates cannot be stored in the database.

See Also
CREATEDATETIME Function (DateTime)
CURRENTDATETIME Function (DateTime)
DT2DATE Function (DateTime)
DT2TIME Function (DateTime)
ROUNDDATETIME Function (DateTime)
Duration Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Represents the difference between two DateTimes. This value can be negative. It is stored as a 64-bit integer. The
integer value is the number of milliseconds during the duration.
The following are examples of durations:
DATETIME -DATETIME=DURATION
DATETIME -DURATION=DATETIME
DATETIME+DURATION=DATETIME

Example
This example shows how to calculate the difference between two DateTimes. It requires that you define the
following variables.

VARIABLE DATATYPE

DateTime1 DateTime

Datetime2 DateTime

Duration Duration

This example is run on a computer with the Current Format in the Regional and Language Options set to English
(United States).

DateTime1 := CREATEDATETIME(010109D, 080000T); // January 1, 2009 at 08:00:00 AM


DateTime2 := CREATEDATETIME(050509D, 133001T); // May 5, 2009 at 1:30:01 PM
Duration := DateTime2 - DateTime1;
MESSAGE(FORMAT(Duration));

The message window displays the following:


124 days 4 hours 30 minutes 1 second

See Also
DateTime Data Type
Time Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Denotes a time ranging from 00:00:00.000 to 23:59:59.999. An undefined or blank time is specified by 0T.
The displayed text format of the time is determined by your Regional and Language Options in Windows.
The following are examples of valid assignments of times to a Time variable MyTime.

MyTime := 0T;
MyTime := 1159T;
MESSAGE(FORMAT(MyTime));
MyTime := 115934T;
MESSAGE(FORMAT(MyTime));
MyTime := 115934.444T;
MESSAGE(FORMAT(MyTime));
MyTime := 0300T;
MESSAGE(FORMAT(MyTime));

The following shows what the message windows display on a computer with the regional format set to English
(United States).
11:59:00 AM
11:59:34 AM
11:59:34.444 AM
3:00:00 AM

SQL Server
Microsoft SQL Server stores information about both date and time in columns of the DATETIME type. Microsoft
Dynamics NAV uses only the time part and inserts a constant value for the date: 01-01-1754.
The Microsoft Dynamics NAV undefined time is represented by the same value as an undefined date. The
undefined date is represented by the earliest valid DATETIME in SQL Server, which is 01-01-1753 00:00:00:000.

See Also
TIME Function (Time)
VARIANT2TIME Function
CREATEDATETIME Function (DateTime)
DT2TIME Function (DateTime)
Date and Time Functions
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


CALCDATE Function (Date)
CLOSINGDATE Function (Date)
DATE2DMY Function (Date)
DATE2DWY Function (Date)
DATI2VARIANT Function
DMY2DATE Function (Date)
DWY2DATE Function (Date)
NORMALDATE Function (Date)
TIME Function (Time)
TODAY Function (Date)
VARIANT2DATE Function
VARIANT2TIME Function
WORKDATE Function (Date)
CALCDATE Function (Date)
1/2/2018 • 3 min to read • Edit Online

Calculates a new date that is based on a date expression and a reference date.

Syntax
NewDate := CALCDATE(DateExpression [, Date])

Parameters
DateExpression
Type: Text, Code, or DateFormula
The date expression can be any length. The string is interpreted from left to right with one subexpression at a time.
The following rules describe the valid syntax of date expressions:
DateExpression = [<SubExpression>][<SubExpression>][<SubExpression>]
<SubExpression> = [<Sign>] <Term>
<Sign> = + | -
<Term> = <Number><Unit> | <Unit><Number> | <Prefix><Unit>
<Number> = Positive integer
<Unit> = D | WD | W | M | Q | Y (D=day, WD=weekday, W=week, M=month, Q=quarter, Y=year)
<Prefix> = C (C=current)
These production rules show that date expressions consist of zero, one, two, or three subexpressions. Each
subexpression consists of an optional sign and a term. The following are some typical examples of terms:
30D (30 days; corresponds to <Number><Unit>)
WD2 (weekday number 2; corresponds to <Unit><Number>)
CW (current week; corresponds to <Prefix><Unit>)
The internal calendar of Dynamics NAV starts on Monday and ends on Sunday. This means that Monday is
weekday 1 and Sunday is weekday 7.
A run-time error occurs if the syntax of DateExpression is incorrect.
Date
Type: Date
Use this optional parameter to define a reference date. The default is the current system date.
If you omit this optional value, the current system date is used.

Property Value/Return Value


Type: Date
The date that is computed from the reference date and the date expression.

Remarks
DateExpression can be a field or variable of type Text or Code, and it can be a field or variable of type
DATEFORMUL A. The benefit of using a DateFormula field or variable is that the date formula becomes language
independent.
The user can enter formulas in the currently selected language. The formula is stored in a generic format in a field
or variable. When the formula must be displayed, the actual string that is displayed is converted to the currently
selected language.
For example, if a user who has language set to ENG (English) enters the date formula "1W+1D" for one week and
one day, then a user who has the language set to FRA (French) sees "1S+1J," and a user who has the language set
to ESP (Spanish) sees "1S+1D".
If a date formula is entered with < > delimiters surrounding it, then the date formula is stored in a generic,
nonlanguage-dependent format. This makes it possible to develop date formulas that are not dependent on the
currently selected language.
For more information about how to calculate the duration between two DateTimes, see Duration Data Type.

Example
This code example shows how to use the production rules that were previously described.

<CQ+1M-10D>

This should be interpreted as the following: current quarter + 1 month - 10 days.


The DateExpression is composed of the following:
<Prefix><Unit><Sign><Number><Unit><Sign><Number><Unit>

NOTE
The angle brackets (< >) specify that the expression is not translated, regardless of the application language. For more
information about multilanguage capabilities with date formulas, see Developing Multilanguage-Enabled Applications.

Example
This example shows how to use the CALCDATE function.
This code example requires that you create the following variables and text constants in the C/AL Globals window.

VARIABLE NAME DATATYPE LENGTH

Expr1 Text 30

Expr2 Text 30

Expr3 Text 30

RefDate Date Not applicable


VARIABLE NAME DATATYPE LENGTH

Date1 Date Not applicable

Date2 Date Not applicable

Date3 Date Not applicable

TEX T CONSTANT ENU VALUE

Text000 'The reference date is: %1 \'

Text001 'The expression: %2 returns %3\'

Text002 'The expression: %4 returns %5\'

Text003 'The expression: %6 returns %7'

Expr1 := '<CQ+1M-10D>'; // Current quarter + 1 month - 10 days


Expr2 := '<-WD2>'; // The last weekday no.2, (last Tuesday)
Expr3 := '<CM+30D>'; // Current month + 30 days
RefDate := 052196D;
Date1 := CALCDATE(Expr1, RefDate);
Date2 := CALCDATE(Expr2, RefDate);
Date3 := CALCDATE(Expr3, RefDate);
MESSAGE(Text000 + Text001 + Text002 + Text003,
RefDate, Expr1, Date1, Expr2, Date2, Expr3, Date3);

The message window displays the following text:


The reference date is: 05/21/96
The expression: CQ+1M -10D returns 07/20/96
The expression: -WD2 returns 05/14/96
The expression: CM+30D returns 06/30/96

See Also
Date and Time Functions
Developing Multilanguage-Enabled Applications
CLOSINGDATE Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets the closing date for a Date Data Type.

Syntax
ClosingDate := CLOSINGDATE(Date)

Parameters
Date
Type: Date
The input date.

Property Value/Return Value


Type: Date
The corresponding closing date for the input date.

Remarks
All dates have a corresponding closing date. A closing date is a period in time following the given date but before
the next regular date. Closing dates are sorted immediately after the corresponding regular date but before the
next regular date.
xxxxxxD: Regular date
xxxxxxC: Closing date
The compiler cannot convert the expression xxxxxxC to a Date data type. Therefore, you must use the
CLOSINGDATE function to create a closing date.

Example
The first example shows how to use the CLOSINGDATE function. A regular date is given as input. This code
example requires that you create the following variables and text constants in the C/AL Globals window.

NAME DATATYPE

Date1 Date

CloDate Date

NAME CONSTVALUE

Text000 The closing date for %1 is %2.


Date1 := 040414D;
CloDate := CLOSINGDATE(Date1);
MESSAGE(Text000, Date1, CloDate);

The following message is displayed:


The closing date for 04/04/14 is C04/04/14.

Example
The second example shows some statements that do not work and explains why they do not work. This example
requires that you create the following variables and text constants in the C/AL Globals window.

NAME DATATYPE

Date1 Date

CloDate1 Date

CloDate2 Date

NAME CONSTVALUE

Text001 The closing date for %1 is %2.

// Date1 := 040414C;
// The previous statement does not compile because the compiler
// cannot convert '040414C' to a Date data type.
Date1 := 040414D;
// The previous statement compiles.
// The compiler converts '040414D' to a Date data type.
// CloDate1 := CLOSINGDATE(050514C);
// The previous statement does not compile because the compiler
// cannot convert '050514C' to a Date data type and the CLOSINGDATE
// function requires a Date data type for its parameter.
CloDate1 := CLOSINGDATE(Date1);
// The previous statement compiles.
// Date1 is a Date data type.
CloDate2 := CLOSINGDATE(CloDate1);
// The previous statement compiles.
// CloDate1 is a Date data type.
MESSAGE(Text001, CloDate1, CloDate2);

The following message is displayed:


The closing date for C04/04/14 is C04/04/14.

See Also
Date and Time Functions
DATE2DMY Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets the day, month, or year of a Date Data Type.

Syntax
Number := DATE2DMY(Date, What)

Parameters
Date
Type: Date
The input date.
What
Type: Integer
Specifies what the function should return. The valid options are 1, 2, and 3.
The value 1 corresponds to Day (1-31).
The value 2 corresponds to Month (1-12).
The value 3 corresponds to Year.

Property Value/Return Value


Type: Integer
The day, month, or year of the Date parameter.

Example
This example shows how to use the DATE2DMY function. This code example requires that you create the following
variables and text constants in the C/AL Globals window.

NAME DATATYPE

InputDate Date

Day Integer

Month Integer

Year Integer

NAME CONSTVALUE

Text000 Today is day %1 of month %2 of the year %3.


InputDate := TODAY;
Day := DATE2DMY(InputDate,1);
Month := DATE2DMY(InputDate,2);
Year := DATE2DMY(InputDate,3);
MESSAGE(Text000,Day,Month,Year);

The message window displays the following:


Today is day 16 of month 2 of the year 2014.

See Also
Date and Time Functions
DATE2DWY Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets the day of the week, week number, or year of a Date Data Type.

Syntax
Number := DATE2DWY(Date, What)

Parameters
Date
Type: Date
The input date.
What
Type: Integer
Specifies what the function returns. The valid options are 1, 2, and 3.
The value 1 corresponds to day of the week (1-7, Monday = 1).
The value 2 corresponds to week number (1-53).
The value 3 corresponds to year.

Property Value/Return Value


Type: Integer
The resulting day of the week, week number, or year.

Remarks
If the input date to the DATE2DWY function is in a week which spans two years, then the DATE2DWY function
computes the output year as the year that has more days of the given week. For example, if the input date is
010114, then the date is in a week that starts on Monday, December 29, 2013, and ends Sunday, January 4, 2014.
This week has three days in 2008 and four days in 2014. Therefore, the output year is 2014.

Example
This example shows a special case that occurs when you use the DATE2DWY function in a week which spans two
years. This code example requires that you create the following variables and text constants in the C/AL Globals
window.

VARIABLE NAME DATATYPE

InputDate Date

DayOfWeek Integer
VARIABLE NAME DATATYPE

WeekNumber Integer

Year Integer

TEX T CONSTANT NAME ENU VALUE

Text000 The date %1 corresponds to:\

Text001 The day of the week: %2\

Text002 The week number: %3\

Text003 The year: %4

InputDate := 010114D;
DayOfWeek := DATE2DWY(InputDate, 1);
WeekNumber := DATE2DWY(InputDate, 2);
Year := DATE2DWY(InputDate, 3);
MESSAGE(Text000 + Text001 + Text002 + Text003, InputDate, DayOfWeek, WeekNumber, Year);

The message window displays the following:


The date 01/01/14 corresponds to:
The day of the week: 4
The week number: 1
The year: 2014
This example shows that the date 01/01/14 is regarded as day number 4 (Thursday) in week number 1 in the year
2014.

See Also
Date and Time Functions
DATI2VARIANT Function
1/2/2018 • 1 min to read • Edit Online

Creates a variant that contains an encapsulation of a COM VT_DATE.

Syntax
Variant := DATI2VARIANT(Date, Time)

Parameters
Date
Type: Date
The input date.
Time
Type: Time
The input time.

Property Value/Return Value


Type: Variant

Example
This example requires that you create the following variables.

NAME DATATYPE

TestDate Date

TestTime Time

Variant1 Variant

TestDate := TODAY;
TestTime := TIME;
Variant1 := DATI2VARIANT(TestDate, TestTime);

See Also
Variant Data Type
Date and Time Functions
Using COM Technologies in Microsoft Dynamics NAV
DMY2DATE Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets a Date object based on a day, month, and year.

Syntax
Date := DMY2DATE(Day [, Month] [, Year])

Parameters
Day
Type: Integer
The number of the day in the month (1-31)
Month
Type: Integer
The number of the month in the year (1-12). If you omit this optional parameter, the current month will be used as
the default.
Year
Type: Integer
The four-digit number of the year. If you omit this optional parameter, the current year is used as the default.

Property Value/Return Value


Type: Date
The resulting date.

Example
This code example requires that you create the following variables and text constants in the C/AL Globals window.

VARIABLE NAME DATATYPE

Day Integer

Month Integer

Year Integer

OutputDate Date

TEX T CONSTANT NAME CONSTVALUE

Text000 Day number %1, month number %2, and year number %3
corresponds to the date %4.
Day := 17;
Month := 2;
Year := 2014;
OutputDate := DMY2DATE(Day, Month, Year);
MESSAGE(Text000, Day, Month, Year, OutputDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
Day number 17, month number 2, and year number 2014 corresponds to the date 02/17/14.

See Also
Date and Time Functions
Date Data Type
DWY2DATE Function (Date)
1/2/2018 • 3 min to read • Edit Online

Gets a Date that is based on a week day, a week, and a year.

Syntax
Date := DWY2DATE(WeekDay [, Week] [, Year]))

Parameters
Weekday
Type: Integer
The number of the day in the week (1-7). Monday is day number 1.
Week
Type: Integer
The number of the week. Week 1 is the first week of the year that has four or more days in the year. If you omit this
optional parameter, the current week is used as the default.
Year
Type: Integer
The four-digit number of the year. If you omit this optional parameter, the year of the current week is used as the
default.

Property Value/Return Value


Type: Date
The resulting date.

Remarks
A special situation occurs if the week (Week) that is input into DWY2DATE spans two years. Depending on
Weekday, the year of the output Date can differ from the input year. This scenario is shown in the following code
example.

Example
The input week in this example spans two years. This code example requires that you create the following variables
and text constants in the C/AL Globals window.

VARIABLE NAME DATATYPE

DayOfWeek Integer

Week Integer
VARIABLE NAME DATATYPE

Year Integer

OutputDate Date

TEX T CONSTANT NAME ENU VALUE

Text000 Day %1 of week %2 in the year %3 is the date %4.

DayOfWeek := 1;
Week := 1;
Year := 2014;
OutputDate := DWY2DATE(DayOfWeek, Week, Year);
MESSAGE(Text000, DayOfWeek, Week, Year, OutputDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
Day 1 of week 1 in the year 2014 is the date: 12/30/13.
The example shows that the first day of the week in the first week of the year 2014 is regarded as the date
December 30, 2013. The first week of the year 2014 is the first week that has four or more days in the year 2014.
That week starts on Monday, December 30, 2013, and ends on Sunday, January 5, 2014.

Example
The input week in this example spans two years. This code example requires that you create the following variables
and text constants in the C/AL Globals window.

VARIABLE NAME DATA TYPE

DayOfWeek Integer

Week Integer

Year Integer

OutputDate Date

TEX T CONSTANT ENU VALUE

Text000 Day %1 of week %2 in the year %3 is the date %4.

DayOfWeek := 1;
Week := 1;
Year := 2016;
OutputDate := DWY2DATE(DayOfWeek, Week, Year);
MESSAGE(Text000, DayOfWeek, Week, Year, OutputDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
Day 1 of week 1 in the year 2016 is the date: 01/04/16.
The example shows that the first day of the week in the first week of the year 2016 is regarded as the date January
4, 2016. The first week of the year 2016 is the first week that has four or more days in the year 2016. That week
starts on Monday, January 4, 2016, and ends on Sunday, January 11, 2015.

Example
This example shows how to use the DWY2DATE function without specifying the optional Year parameter. The
output in this example depends on the day on which you run the code. This code example requires that you create
the following variables and text constants in the C/AL Globals window.

VARIABLE NAME DATATYPE

DayOfWeek Integer

Week Integer

OutputDate Date

TEX T CONSTANT ENU VALUE

Text000 Day %1 of week %2 is the date %3.

DayOfWeek := 1;
Week := 1;
OutputDate := DWY2DATE(DayOfWeek, Week);
MESSAGE(Text000, DayOfWeek, Week, OutputDate);

On a computer that has the regional format set to English (United States), if you ran the code on January 1, 2014,
then the message window displays the following:
Day 1 of week 1 is the date: 12/30/13.
If you do not specify the year, then the year of the current week is used. On January 1, 2014, the current week is
the week that starts on December 30, 2013 and ends on January 5, 2014. This week has four days in 2014 so the
year of the current week is 2014. The first day of the first week of 2014 is 12/30/13.
On a computer that has the regional format set to English (United States), if you ran the code on January 1, 2016,
then the message window displays the following:
Day 1 of week 1 is the date: 12/29/14.
On January 1, 2016, the current week is the week that starts on December 28, 2015 and ends on January 3, 2016.
This week has four days in 2015 so the year of the current week is 2015. The first day of the first week of 2015 is
12/29/14.

See Also
Date and Time Functions
NORMALDATE Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets the regular date (instead of the closing date) for the argument Date.

Syntax
NormalDate := NORMALDATE(Date)

Parameters
Date
Type: Date
The input date. You can enter a closing date or a normal date. A run-time error occurs if the value of Date is set to
the undefined date (0D ).

Property Value/Return Value


Type: Date
The resulting date. If the input date is either a normal date or a closing date, then the return value is a normal date.

Remarks
All dates have a corresponding closing date. A closing date is a period of time that follows the given date but
comes before the next date. Closing dates are sorted immediately after the corresponding date and before the next
date.
xxxxxxD: regular date
xxxxxxC: closing date

Example
The input date is a regular date. This code example requires that you create the following variables and text
constants in the C/AL Globals window.

VARIABLE NAME DATATYPE

InputDate Date

OutputDate Date

TEX T CONSTANT NAME ENU VALUE

Text000 The normal date for %1 is %2.


InputDate := 040414D;
OutputDate := NORMALDATE(InputDate);
MESSAGE(Text000, InputDate, OutputDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
The normal date for 04/04/14 is 04/04/14.

Example
The input date is a closing date. This code example requires that you create the following variables and text
constants in the C/AL Globals window.

VARIABLE NAME DATATYPE

InputDate Date

OutputDate Date

TEX T CONSTANT NAME ENU VALUE

Text001 The normal date for %1 is %2.

InputDate := CLOSINGDATE(040414C);
OutputDate := NORMALDATE(InputDate);
MESSAGE(Text001, InputDate, OutputDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
The normal date for C04/04/14 is 04/04/14.

See Also
Date and Time Functions
TIME Function (Time)
1/2/2018 • 1 min to read • Edit Online

Gets the current time from the operating system.

Syntax
Time := TIME

Property Value/Return Value


Type: Time
The current time.

Remarks
You can only use the TIME function to retrieve the time from the operating system. You cannot use it to set the
time in the operating system.

Example
This example requires that you create the following text constant in the C/AL Globals window.

NAME CONSTVALUE

Text000 The current system time is %1.

MESSAGE(Text000, TIME);

On a computer that has the regional format set to English (United States), the message window could display the
following:
The current system time is 11:15:46 AM.

See Also
Time Data Type
Date and Time Functions
TODAY Function (Date)
1/2/2018 • 1 min to read • Edit Online

Gets the current date set in the operating system.

Syntax
Date := TODAY

Property Value/Return Value


Type: Date
The current date defined by the operating system.

Remarks
You can only use the TODAY function to retrieve the current date from the operating system. You cannot use it to
set the date in the operating system.

Example
This example shows how to use the TODAY function. This example requires that you create the following text
constant in the C/AL Globals window.

NAME CONSTVALUE

Text000 The current date is: %1

MESSAGE(Text000, TODAY);

The message window could display the following:


The current date is: 05/27/08

See Also
Date and Time Functions
VARIANT2DATE Function
1/2/2018 • 1 min to read • Edit Online

Gets a date from a variant.

Syntax
Date := VARIANT2DATE(Variant)

Parameters
Variant
Type: Variant
The input variant.

Property Value/Return Value


Type: Date
The resulting date.

Example
This example requires that you create the following variables.

NAME DATATYPE

TestDate Date

variant1 Variant

variant1 := TODAY;
TestDate := VARIANT2DATE(variant1);

See Also
Variant Data Type
Date and Time Functions
Using COM Technologies in Microsoft Dynamics NAV
VARIANT2TIME Function
1/2/2018 • 1 min to read • Edit Online

Gets a time from a variant.

Syntax
Time := VARIANT2TIME(Variant)

Parameters
Variant
Type: Variant
The input variant.

Property Value/Return Value


Type: Time
The resulting time.

Example
This example requires that you create the following variables.

NAME DATATYPE

TestTime Time

variant1 Variant

variant1 := TIME;
TestTime := VARIANT2TIME(variant1);

See Also
Variant Data Type
Date and Time Functions
Using COM Technologies in Microsoft Dynamics NAV
WORKDATE Function (Date)
5/14/2018 • 1 min to read • Edit Online

Gets and sets the work date for the current session.

Syntax
[WorkDate]:= WORKDATE([NewDate])

Parameters
NewDate
Type: Date
The new work date you want to set.

Property Value/Return Value


Type: Date
The new work date.

Remarks
If you do not set a value for the NewDate parameter, then the function returns the work date that is specified by
the Set Work Date option on the Application menu in the Microsoft Dynamics NAV Windows client. If
there is no work date selected, then the current system date is returned.
To set the work date to follow the calendar day so that the work date is always the current date, set NewDate to
TODAY or 0D . If you explicitly set NewDate to the current date, then the work date will also follow the calendar
day.

Example
The following code sets the work date to January 1, 2018, and returns the new date in a message. This example
requires that you create the following variable and text constant in the C/AL Globals window.

VARIABLE DATATYPE

MyWorkDate Date

NAME CONSTVALUE

Text000 The new work date is: %1

MyWorkDate := WORKDATE(010118D);
MESSAGE(Text000, MyWorkDate);

On a computer that has the regional format set to English (United States), the message window displays the
following:
The work date is: 01/01/18
The following example, gets the current work date:

MyWorkDate := WORKDATE;

See Also
Date and Time Functions
DateTime Functions
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


CREATEDATETIME Function (DateTime)
CURRENTDATETIME Function (DateTime)
DT2DATE Function (DateTime)
DT2TIME Function (DateTime)
ROUNDDATETIME Function (DateTime)
Debugger
1/2/2018 • 1 min to read • Edit Online

Use the debugger functions to implement a debugger for C/AL code. The Microsoft Dynamics NAV 2018
Debugger is an example of a debugger application that is built using tables, pages, codeunits, and the C/AL
debugger functions.
Decimal Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This simple data type denotes decimal numbers ranging from -999,999,999,999,999.99 to
+999,999,999,999,999.99.

Example
The following are examples of decimal values.

546.88
3425.57

Example
The following is not a decimal, but rather an Integer Data Type.

342

Changes from Previous Versions


In Microsoft Dynamics NAV 2018, the Decimal data type is mapped to the Microsoft .NET Framework common
language runtime (CLR ) Decimal data type and the precision and limits behave slightly differently than the Binary
Coded Decimal (BCD ) data type in previous versions of C/AL. This example shows how decimal data types are
different in Microsoft Dynamics NAV 2018.
The following table shows the limits for variables of type DECIMAL in Microsoft Dynamics NAV 2018 and in
previous versions.

LIMIT MICROSOFT DYNAMICS NAV 2018 PREVIOUS VERSIONS OF DYNAMICS NAV

Maximum format value. +/- 999,999,999,999,999.99 +/- 999,999,999,999,999.99

This is the maximum value that can be:

- Formatted into a TEXT variable by the


FORMAT function.
- Input from the UI or XMLPorts.
- Assigned directly in source code.

Maximum field data type value. +/- 999,999,999,999,999.99 +/- (9,99999999999999E+63)

This is the maximum value that a field


variable in a record can hold while not
being persisted.

Maximum persisted value. Can read previous stored values but +/- 999.999.999.999.999.999,99
cannot store values outside the
This is the maximum value that can be formatting range since field variables
stored in the database. cannot be assigned values outside the
formatting range.
LIMIT MICROSOFT DYNAMICS NAV 2018 PREVIOUS VERSIONS OF DYNAMICS NAV

Maximum calculating value. +/- +/- (9,99999999999999E+63)


79,228,162,514,264,337,593,543,950,3
This is the maximum value that can be 35
calculated by code statements while not
assigning to a field variable, storing to
the database, or formatting to a text
variable.

This table shows that the maximum safe value that will work on all versions of Dynamics NAV is +/-
999,999,999,999,999.99.
It is possible to assign to a variable the maximum value that can be formatted and then multiply that variable by a
large positive number, thereby generating a greater value. However, we do not recommend doing this. If you do,
you will get errors if you attempt to format this variable to a text variable or assign the variable to a field variable in
a record.

See Also
BigInteger Data Type
Integer Data Type
ABS Function (Decimal, Integer, BigInteger)
POWER Function (Decimal, Integer, BigInteger)
RANDOM Function (Integer)
RANDOMIZE Function (Integer)
ROUND Function (Decimal)
Dialog Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Variables of this complex data type store dialog windows. These variables also give you access to a number of
dialog functions, such as OPEN Function (Dialog), CLOSE Function (Dialog), and so on.

Dialog Functions
CLOSE Function (Dialog)
CONFIRM Function (Dialog)
ERROR Function (Dialog)
MESSAGE Function (Dialog)
OPEN Function (Dialog)
STRMENU Function (Dialog)
UPDATE Function (Dialog)
FieldRef Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This complex data type identifies a field in a table and gives you access to this field. The FieldRef object can refer to
any field in any table in the database.

See Also
ACTIVE Function (FieldRef )
CALCFIELD Function (FieldRef )
CALCSUM Function (FieldRef )
CAPTION Function (FieldRef, TestPage Field)
CL ASS Function (FieldRef )
FIELDERROR Function (FieldRef )
GETFILTER Function (FieldRef )
GETRANGEMAX Function (FieldRef )
GETRANGEMIN Function (FieldRef )
LENGTH Function (FieldRef )
NAME Function (FieldRef )
NUMBER Function (FieldRef )
OPTIONCAPTION Function (FieldRef )
OPTIONSTRING Function (FieldRef )
RECORD Function (FieldRef )
REL ATION Function (FieldRef )
SETFILTER Function (FieldRef )
SETRANGE Function (FieldRef )
TESTFIELD Function (FieldRef )
TYPE Function (FieldRef )
VALIDATE Function (FieldRef )
VALUE Function (FieldRef, TestPage Field)
File Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

The File data type gives access to files. Files can be opened in text or binary mode. For more information, see
TEXTMODE Function (File).
You can read from or write to a file by creating input and output streams, respectively. To do so, use the
CREATEINSTREAM Function (File) and CREATEOUTSTREAM Function (File). For more information, see InStream
and OutStream Data Types.

See Also
CLOSE Function (File)
COPY Function (File)
CREATE Function (File)
CREATEINSTREAM Function (File)
CREATEOUTSTREAM Function (File)
CREATETEMPFILE Function (File)
DOWNLOAD Function (File)
DOWNLOADFROMSTREAM Function (File)
ERASE Function (File)
EXISTS Function (File)
GETSTAMP Function (File)
LEN Function (File)
NAME Function (File)
OPEN Function (File)
POS Function (File)
READ Function (File)
RENAME Function (File)
SEEK Function (File)
SETSTAMP Function (File)
TEXTMODE Function (File)
TRUNC Function (File)
UPLOAD Function (File)
UPLOADINTOSTREAM Function (File)
WRITE Function (File)
WRITEMODE Function (File)
FilterPageBuilder Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A FilterPageBuilder data type is a complex data type that stores filter configurations for a filter page. A filter page is
a dynamic page type that contains one or more filter controls that enables users to set filters on fields of the
underlying tables.

See Also
ADDFIELD Function
ADDFIELDNO Function
ADDRECORD Function
ADDRECORDREF Function
ADDTABLE Function
GETVIEW function (FilterPageBuilder)
SETVIEW Function
COUNT Function (FilterPageBuilder)
NAME Function (FilterPageBuilder)
RUNMODAL Function (FilterPageBuilder)
GUID Data Type
1/2/2018 • 3 min to read • Edit Online

Assigns a unique identifying number to any database object. The GUID data type is a 16 byte binary data type. This
data type is used for the global identification of objects, programs, records, and so on. The important property of a
GUID is that each value is globally unique. The value is generated by an algorithm, developed by Microsoft, which
assures this uniqueness.
The GUID is a 16-byte binary data type that can be logically grouped into the following subgroups:
4byte-2byte-2byte-2byte-6byte.
The standard textual representation is {12345678-1234-1234-1234-1234567890AB }.
The virtual table OLE Control (2000000042) does not use the GUID data type. It uses a textual representation of
the GUID in a text field instead. It is easier to make operations and references to this text field using the GUID data
type than it is using the textual representation. The GUID data type is compatible with the existing textual
representation.
The GUID data type is useful when you want to uniquely identify some data, so that it can be exchanged with
external applications. For example, if you want to transfer an item catalog to an external application, you add a
GUID field to the record in the table and use this as the primary reference when you communicate with the external
application.

Compatibility
You can assign and compare the Text data type and the GUID data type. Assigning a GUID to a Text can be done as
follows:

MyTableRec.MyGuid := MyTableRec.MyText;

Useful C/AL Functions and Properties


The following C/AL functions can be used with the GUID data type:

Guid:=CREATEGUID();

This function creates a new unique GUID value. The value can then be assigned to a field of the GUID data type or
of the Text data type.

Ok:=ISNULLGUID(Guid);

This function is a convenient way to check if a value has already been assigned to a GUID. A NULL GUID
(consisting only of zeroes) is valid, but should never be used for reference purposes.

CLEAR(Guid);

The standard CLEAR function can also be used on the GUID data type. It nullifies the GUID.
AutoSplitKey

A NULL GUID is valid but is not useful in a table. Therefore, the AutoSplitKey property is implemented for the
GUID data type when it is used in a page. When GUID is selected as a primary key, AutoSplitKey is enabled for
the page, and the GUID value remains NULL. When you create a new record, a valid GUID is created and assigned
automatically.
The CREATEGUID Function (GUID ) and ISNULLGUID Function (GUID ) functions are available in the C/AL
Symbol Menu under SYSTEM, Variables.
CREATEGUID takes no arguments and returns a valid 16-byte GUID value. If the result is assigned to a TEXT
variable or field, the value is converted to a string and follows the syntax explained earlier. The algorithm that
generates the new GUID value uses Microsoft's CoCreateGuid function.
ISNULLGUID takes a GUID value as a required argument and returns TRUE/FALSE depending on whether the
GUID value is NULL. This function does not accept a Text value as an argument.
CLEAR is the standard CLEAR function and takes one required argument. It nullifies the GUID value in the same
way as it resets any other value.
AutoSplitKey is a property, not a function and can be applied to pages. If you have defined a GUID field as part of
the primary key, the AutoSplitKey property automatically generates a new valid GUID value. When a new record
is created and the GUID field is left as NULL, the AutoSplitKey property ensures that a valid GUID value is
automatically inserted into the field. If you then enter a NULL GUID into this record, for example, by using the
CLEAR function, this new NULL GUID value is not automatically replaced by the AutoSplitKey property. The
AutoSplitKey property only applies to new records.

Format
The GUID value can also be represented as text. You can use the standard C/AL functions FORMAT and
EVALUATE to convert from GUID values to Text values. If you do not use the correct format when you edit a GUID
value in its textual format, the following error message is displayed:
Invalid Format of GUID string. The correct format of the GUID string is {CDEF7890-ABCD -1234-ABCD -
1234567890AB } where 0-9, A -F symbolizes hexadecimal digits.

See Also
CREATEGUID Function (GUID )
ISNULLGUID Function (GUID )
InStream and OutStream Data Types in Dynamics
NAV
1/2/2018 • 1 min to read • Edit Online

Reads from or writes to files and BLOBs.

Remarks
The InStream (input stream) and OutStream (output stream) data types are generic stream objects that you can
use to read from or write to files and BLOBs. In addition, the InStream and OutStream data types enable data to be
read from and sent to Automation Data Type objects and OCX Data Type objects. The Microsoft XML DOM can
read from an InStream object and write to an OutStream object.
You can define the internal structure of a stream as a flat stream of bytes. You can assign one stream to another.
Reading from and writing to a stream occurs sequentially.
You can create a stream object by using the following functions:
CREATEINSTREAM Function (BLOB )
CREATEOUTSTREAM Function (BLOB )
CREATEINSTREAM Function (File)
CREATEOUTSTREAM Function (File)
You can use InStream in the following ways:
COPYSTREAM Function
InStream.READ Function
InStream.EOS Function
InStream.READTEXT Function
You can use OutStream in the following ways:
COPYSTREAM Function
OutStream.WRITE Function
OutStream.WRITETEXT Function
InStream
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


COPYSTREAM Function
InStream.EOS Function
InStream.READ Function
InStream.READTEXT Function
OutStream
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


COPYSTREAM Function
OutStream.WRITE Function
OutStream.WRITETEXT Function
Integer Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This simple data type stores whole numbers with values that range from -2,147,483,647 to 2,147,483,647.

Remarks
In addition to representing whole numbers in this range, you can use integers to represent Boolean values. For
Boolean values, -1 represents true and 0 represents false.
If you assign -2,147,483,648 directly to an Integer variable, then you get an error when you try to compile the
code. However, you can indirectly assign -2,147,483,648 to an Integer variable by using the following code.

IntegerVar := -2147483647;
IntegerVar := IntegerVar - 1;

If you try to indirectly assign a value that is smaller than -2,147,483,648 or larger than 2,147,483,647, then you get
a run-time error.

Example
The following are examples of integer values.

546
-3425

Example
The following example is a decimal and not an integer.

342.45

See Also
BigInteger Data Type
Decimal Data Type
ABS Function (Decimal, Integer, BigInteger)
POWER Function (Decimal, Integer, BigInteger)
RANDOM Function (Integer)
RANDOMIZE Function (Integer)
ROUND Function (Decimal)
KeyRef Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Identifies a key in a table and the fields in this key.

Remarks
This complex data type gives you access to the key and the fields it contains.
The KeyRef object can refer to any key in any table in the database.

See Also
ACTIVE Function (KeyRef )
FIELDCOUNT Function (KeyRef )
FIELDINDEX Function (KeyRef )
RECORD Function (KeyRef )
Media Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A complex type that encapsulates media files, such as image .jpg and .png files, in application database tables. The
Media data type can be used as a table field data type, but cannot be used as a variable or parameter.
The Media data type enables you to import a media file to the application database and reference the file from
records, making it possible to display the media file in the client user interface. You can also export media from the
database to files and streams.

See Also
Working With Media on Records
EXPORTFILE Function (Media)
EXPORTSTREAM Function (Media)
EXPORTSTREAM Function (Media)
IMPORTFILE Function (Media)
IMPORTSTREAM Function (Media)
MEDIAID Function (Media)
MEDIAID Function (Media)
MediaSet Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A complex type that encapsulates media, such as images, in application database tables. The MediaSet data type
can be used as a table field data type, but cannot be used as variable or parameter.
The MediaSet data type enables you to import media to the application database as part of a collection, and then
reference the imported media from records. This makes it possible to display the media in the client user interface.
You can also export media from the database to files and streams.

See Also
Working With Media on Records
COUNT Function (MediaSet)
IMPORTFILE Function (MediaSet)
IMPORTSTREAM Function (MediaSet)
INSERT Function (MediaSet)
ITEM Function (MediaSet)
MEDIAID Function (MediaSet)
EXPORTFILE Function
NAV App
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


GETARCHIVERECORDREF Function
GETARCHIVEVERSION Function
RESTOREARCHIVEDATA Function
DELETEARCHIVEDATA Function
LOADPACKAGEDATA Function

See Also
Extending Microsoft Dynamics NAV Using Extension Packages
Notification Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A complex type for publishing and consuming notifications in the application. Notifications provide a programmatic
way to send non-intrusive information to the user interface (UI).

See Also
Notifications
ADDACTION Function (Notification)
GETDATA Function (Notification)
ID Function (Notification)
MESSAGE Function (Notification)
RECALL Function (Notification)
SCOPE Function (Notification)
SETDATA Function (Notification)
SETDATA Function (Notification)
Numbers
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


BigInteger Data Type
Decimal Data Type
Integer Data Type
Numeric Functions
OCX Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

References a custom control, such as OCX or ActiveX control.

Remarks
IMPORTANT
OCX data types are not supported by Microsoft Dynamics NAV Web client.

To use a control in Microsoft Dynamics NAV Development Environment, define a variable of type OCX and give it
a name. Then choose the lookup button in the Subtype field to locate and select the control that you want to use.
You select from a list of installed controls, and when you select one, the GUID of the control is inserted. When the
focus leaves the Subtype field, the name of the control is substituted for the GUID.
When you have defined a control as a variable, you can use the control through the variable, and you can browse
its methods and properties in the Symbol Menu.
When you are using a control, there is no one-to-one relationship between C/AL data types and COM data types.
For an overview of the data type mapping, see Using COM Technologies in Microsoft Dynamics NAV.
Option Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This simple data type denotes an option value.

Remarks
In the OptionString Property of the field or variable, you can enter the option values as a comma-separated list. The
Option type is a zero-based enumerator type, which means that the option values are assigned to sequential
numbers, starting with 0. You can convert option data types to integers.
For more information about option variables in multilanguage-enabled applications, see Developing
Multilanguage-Enabled Applications.

Example
In the Purchase Header table, the Status field is an Option data type. In the following example, the option value is
converted into an integer. This example requires that you create the following variables.

NAME DATA TYPE SUBTYPE

Number Integer Not applicable

PurchHeaderRec Record Purchase Header

Number := PurchHeaderRec."Document Type";

Example
This example shows how you can use the value of an option field as a constant in your C/AL code.

PurchHeaderRec."Document Type" := PurchHeaderRec."Document Type"::Invoice;


Page Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This complex data type stores pages.

Remarks
Pages contain a number of simpler elements called controls. Controls are used to display information to the user or
receive information from the user.

See Also
OBJECTID Function (Page)
PAGE.RUN Function
PAGE.RUNMODAL Function
RUN Function (Page)
RUNMODAL Function (Page)
SETRECORD Function (Page)
SETSELECTIONFILTER Function
SETTABLEVIEW Function (Page, Report, XMLport)
UPDATE
Query Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A complex data type that stores queries.

Remarks
A query enables you to retrieve data from multiple tables and combine the data in single dataset.

See Also
Accessing Columns of a Query Dataset
CLOSE Function (Query)
COLUMNCAPTION Function
COLUMNNAME Function
COLUMNNO Function
GETFILTER Function (Query)
GETFILTERS Function (Query)
OPEN Function (Query)
READ Function (Query)
SAVEASCSV Function
SAVEASXML Function
SETFILTER Function (Query)
SETRANGE Function (Query)
TOPNUMBEROFROWS Function
Record Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This complex data type corresponds to a row in a table. Each record consist of fields that form the columns of the
table. A record is typically used to hold information about a fixed number of properties.

Remarks
To access a field in a table in your C/AL code, use the following syntax: TableName.FieldName
RecordID Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This data type contains the table number and the primary key of a table.
You can store a RecordID in the database. You can set filters on the full RecordID values, but you cannot set filters
on partial values, which means wildcard (*) filters are not supported.

NOTE
You cannot use the GET function to retrieve a record in a table by its primary key value if the primary key field in the table has
the data type RecordID. In this case, you can retrieve the record by using the Record.SETRANGE(FieldName, FieldValue)
function.

See Also
GETRECORD Function (RecordID )
TABLENO Function (RecordID ) GET Function (RecordID )
RecordRef Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

A RecordRef object references a record in a table. Typically, you use a RecordRef object in functions that must apply
to more than one table, not to a specific table. For example, you could use a RecordRef object in a function that
loops through several tables or as a parameter of a function that is called for records of different tables.
The RecordRef object can refer to any table in the database. Use the OPEN Function (RecordRef ) to use the table
number to select the table that you want to access, or use the GETTABLE Function (RecordRef ) to use another
record variable to select the table that you want to access.
If one RecordRef variable is assigned to another RecordRef variable, then they both refer to the same table instance.

See Also
FieldRef Data Type
Report Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This complex data type stores reports.

Remarks
Reports contain a number of simpler elements called controls. Controls are used to display information to the user
or receive information from the user.

See Also
BREAK Function (Report, XMLport)
DEFAULTL AYOUT Function
EXECUTE Function
PREVIEW Function (Report)
PRINT Function
PRINTONLYIFDETAIL Function (Report)
QUIT Function (Report, XMLport)
RDLCL AYOUT Function
REPORT.RUN Function
REPORT.RUNMODAL Function
RUN Function (Report)
RUNMODAL Function (Report)
RUNREQUESTPAGE Function
SAVEAS Function
SAVEASEXCEL Function (Report)
SAVEASPDF Function (Report)
SAVEASWORD Function (REPORT)
SAVEASXML Function (Reports)
SETTABLEVIEW Function (Page, Report, XMLport)
SKIP Function (Report, XMLport)
WORDL AYOUT Function
WORDXMLPART Function
Sessions
3/7/2018 • 1 min to read • Edit Online

Use the session functions to manage Dynamics NAV sessions.

See Also
APPLICATIONAREA Function
BINDSUBSCRIPTION Function
CURRENTCLIENTTYPE Function
CURRENTEXECUTIONMODE Function (Sessions)
DEFAULTCLIENTTYPE Function
STARTSESSION Function (Sessions)
STOPSESSION Function (Sessions)
UNBINDSUBSCRIPTION Function
USERID Function (Sessions)
USERSECURITYID Function
SENDTRACETAG Function
Strings
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


BigText Data Type
Code Data Type
Text Data Type
BigText Functions
String Functions
We recommend the following guidelines for using the BigText, Code, and Text data types:
Use the BigText data type for large documents.
If a text field is part of a primary key, then use the Code data type.
If a text field has a TableRelation, then use the Code data type.
If the field is assigned values from a Code field, then use the Code data type. For example, if the Document
No. field in the G/L Entry table is copied from the primary key field No. in the Sales Header or Purchase
Header table, then use the Code data type for the Document No. field.
For all other text fields, use the Text data type.
In addition to the system functions that are available for string data types, you can also use C/AL operators
on strings. For example, to concatenate two strings, use the + operator. For more information, see C/AL
Operators.
System
1/2/2018 • 1 min to read • Edit Online

This section contains the following topics:


Array Functions
Language Functions
Operating System Functions
Variable Functions
Encryption Functions

See Also
C/AL Functions
Technical Reference
TableConnectionType Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use variables of this data type to specify the type of connection to an external database.
You can specify tables as external by setting the TableType property. For more information, see External Tables.

Syntax
See Also
TableType Property
External Tables
REGISTERTABLECONNECTION Function (Database)
UNREGISTERTABLECONNECTION Function (Database)
SETDEFAULTTABLECONNECTION Function (Database)
GETDEFAULTTABLECONNECTION Function (Database)
HASTABLECONNECTION Function (Database)
TaskScheduler Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

The TaskScheduler data type is a complex data type for creating and managing tasks in the task scheduler, which
runs codeunits at scheduled times.
For more information about the task scheduler, see Task Scheduler.

See Also
CANCELTASK Function
CANCREATETASK Function
CREATETASK Function
SETTASKREADY Function
TASKEXISTS Function
TableFilter Data Type
1/2/2018 • 1 min to read • Edit Online

Applies a filter to another table. Currently, this data type can only be used when you are setting security filters from
the Permission table.
Test Pages
1/2/2018 • 1 min to read • Edit Online

You can use test pages to mimic actual pages so that you can test the code the page. There are two types of test
pages:
TestPage
TestRequestPage
You use the TestPage Functions to:
Open and close test pages.
Navigate among records to display on the test page.
Navigate among fields on the test page.
Expand and collapse rows on a test page.
Create a new record from a test page.
Get the options and option count for an option field.
Get validation errors and error counts.
You use the TestPage Field Functions to:
Set the focus on a specific field.
Set the value of a field.
Compare the value of a field.
Simulate the drop-down arrow, drill-down, and lookup buttons on a field.
You use the TestPage Filter Functions to set filter parameters, such as current key, and direction to display the
results, such as ascending or descending.
You use the TestPage Action Functions to invoke an action on a page. This includes both actions that you
define in Page Designer and built-in actions, such as Yes, No, OK, and Cancel.

See Also
TestPage Data Type
TestRequestPage Data Type
TestPage Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Stores test pages. A test page is a logical representation of a page that does not display a user interface (UI). The
subtype of a test page is the page that it is used to test.
A test page can be any page type. For more information about types of pages, see Pages Overview.

Remarks
You can use test pages only within test codeunits.

See Also
TestRequestPage Data Type
TestRequestPage Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This data type stores test request pages. A test request page part is a logical representation of a request page on a
report. A test request page does not display a user interface (UI). The subtype of a test request page is the report
whose request page you want to test.

Remarks
You can use test request pages only within test codeunits.

See Also
TestPage Data Type
Text Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This simple data type denotes a text string.

Remarks
Microsoft Dynamics NAV 2018 does not enforce a limit on the length of a Text variable. You can specify a
maximum length in the C/AL Globals or C/AL Locals window when you create the variable, but it is not required.
There is no performance impact if you do not specify a length. The maximum length of a Text field in a table is 250
characters. The length of a text variable equals the number of characters in the string. An empty text string has a
length of zero (0). A text string cannot be null.
You can index any character position in a text string, for example A[65]. The resulting value will be a Char Data
Type.
You cannot assign a char to a position in the code variable greater than the current length of the variable +1. For
more information, see Char Data Type.
The Text data type supports Unicode.

Example
This example shows some typical examples of text strings. In these examples, the text variable has a maximum
length of 6.

text := 'ABC';
// Results in a text variable which contains 'ABC'.
text := '123456abc';
// Results in a run-time error because the length (9)
// exceeds the maximum length of 6.

See Also
CONVERTSTR Function (Code, Text)
COPYSTR Function (Code, Text)
DELCHR Function (Code, Text)
DELSTR Function (Code, Text)
FORMAT Function (Code, Text)
INCSTR Function (Code, Text)
INSSTR Function (Code, Text)
LOWERCASE Function (Code, Text)
MAXSTRLEN Function (Code, Text)
PADSTR Function (Code, Text)
SELECTSTR Function (Code, Text)
STRCHECKSUM Function (Code, Text)
STRLEN Function (Code, Text)
STRPOS Function (Code, Text)
STRSUBSTNO Function (Code, Text)
UPPERCASE Function (Code, Text)
TransactionType Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Use variables of this complex data type to store the current transaction type. You can then use the value to set the
transaction type. You can only change the transaction type when there is no current transaction (immediately after
a commit).
For more information about transaction types, see TransactionType Property.
For more information about the rules governing transaction types, see CURRENTTRANSACTIONTYPE Function
(Database).
Variant Data Type in Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

The C/AL variant data type can contain many C/AL data types or any variants from OCX and Automation objects.
However, not all these values can be mapped to C/AL values. For more information, see Using COM Technologies
in Microsoft Dynamics NAV.
The variant data type can contain the following C/AL data types:
Action
Automation
BigInteger
BigText
Boolean
Byte
Char
Code
Codeunit
Date
DateFormula
DateTime
Decimal
Duration
FilterPageBuilder
GUID
InStream
Integer
Option
OutStream
Record
RecordRef
Text
Time
TransactionType
You can use the variant data type to pass Automation variants from one external component (Automation
or OCX) to another. This requires that the recipient component can accept the original variant. You can also
assign a C/AL variable to a variant and pass it to an external component. When you pass C/AL variants
ByRef to an external COM component, small conversion differences may occur. Therefore, we recommend
that you pass C/AL variants ByVal if you do not have to assign a new value to the C/AL variant in your
external component.

Returning Variants in Internal Function Calls


The C/AL variant is a complex data type. To return C/AL variants in function calls, you must pass them in a
parameter ByVar (called ByRef in COM ).

Passing DateTime variables to Automation


It is not possible to pass a C/AL DateTime variable to Automation. However, you can convert the C/AL DateTime
to a variant, and then pass it to Automation. The following examples shows how to pass a DateTime to
Automation. This example requires that you create the following variables.

VARIABLE DATA TYPE

varAutomation Automation

varVariant Variant

varDateTime DateTime

varDateTime := CURRENTDATETIME;
varVariant := varDateTime;
varAutomation.MethodDateData(varVariant);

Variants and Approximation


A C/AL variant contains two allocation areas: one for C/AL variables and one for Automation and OCX variants.
This means every time that you assign a C/AL variable to a variant, the variant will contain the same data as the
original variable. The conversion process does not change the data in any way. However, this is not the case with
DATI2VARIANT because it is a VT_VARIANT. When you assign an external variable to a variant, the variant will
also contain the same data as the original external variable.

Assigning Automation Variants to FieldRef Values


In Microsoft Dynamics NAV 2018, if an Automation method returns a byte string (bstr) in a variant, you cannot
assign that variant to a field that is a Code data type. Instead, you must first assign the variant to a code variable,
and then assign the code variable to the FieldRef value. For example, the following code assigns a variant from an
Automation method to a variable, and then assigns the variable to a field.

CodeVariable := AutomationMetodReturningBStrInVariant();
FieldRef.Value := CodeVariable;

In earlier versions of Dynamics NAV, you could assign the variant to a Code FieldRef value.

See Also
DATI2VARIANT Function
ISACTION Function (Variant)
ISAUTOMATION Function (Variant)
ISBINARY Function (Variant)
ISBOOLEAN Function (Variant)
ISCHAR Function (Variant)
ISCODE Function (Variant)
ISCODEUNIT Function (Variant)
ISDATE Function (Variant)
ISDATEFORMUL A Function (Variant)
ISDECIMAL Function (Variant)
ISFILE Function (Variant)
ISINSTREAM Function (Variant)
ISINTEGER Function (Variant)
ISOPTION Function (Variant)
ISOUTSTREAM Function (Variant)
ISRECORD Function (Variant)
ISTEXT Function (Variant)
ISTIME Function (Variant)
ISTRANSACTIONTYPE Function (Variant)
VARIANT2DATE Function
VARIANT2TIME Function
XMLport Data Type in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

You use XMLports to import and export data in .xml, .csv, or .txt format. XMLports make the process of exchanging
data in XML between systems more simple and streamlined. You only need a basic knowledge of XML and you do
not have to create XML documents using external products.
XMLports support multiple languages with the CaptionML Property.
XMLports support UTF -8, UTF -16, and ISO -8859-2 formats for XML.

Remarks
For more information about how to design XMLports, see XMLports.

See Also
BREAK Function (Report, XMLport)
EXPORT Function (XMLport)
FILENAME Function (XMLport)
IMPORT Function (XMLport)
QUIT Function (Report, XMLport)
RUN Function (XMLport)
SETTABLEVIEW Function (Page, Report, XMLport)
SKIP Function (Report, XMLport)
Properties
1/2/2018 • 1 min to read • Edit Online

This section describes all properties that are available to developers in Microsoft Dynamics NAV 2018.
You can set the value of each property in the Value field. When you leave this field (by pressing Enter or by
moving with the arrow keys), the property is updated. Default values are displayed in angle brackets (<>). If a
property has a default value, then you can reset the property to the default value by deleting the current value
and then moving out of the field.

NOTE
In the Microsoft Dynamics NAV Development Environment, a bold property value indicates that the property value is not
set to its default value.

See Also
Codeunit Properties
MenuSuite Properties
Page Properties
Query Properties
Report Properties
Table Properties
XMLPort Properties
C/AL Functions
Triggers
How to: View or Modify Properties on a Table or Field
Page Properties Not Supported by Microsoft Dynamics NAV Web Client
Codeunit Properties
1/2/2018 • 1 min to read • Edit Online

This topic lists properties that apply to the Codeunit object, variables, text constants, functions, parameters, and
return values.

Codeunit Object Properties


The following properties apply to the Codeunit object.
ID Property
Name Property
Permissions Property
SingleInstance Property
SubType Property (Codeunit)
TableNo Property
TestIsolation Property

C/AL Globals Variables Properties


The following properties apply to Variables in the C/AL Globals window of codeunit objects.
Dimensions Property
ID Property
IncludeInDataSet Property
OptionString Property
WithEvents Property

C/AL Globals Text Constants Properties


The following properties apply to Text Constants in the C/AL Globals window of codeunit objects.
ConstValue Property
ConstValueML Property
ID Property

C/AL Globals Functions Properties


The following properties apply to Functions in the C/AL Globals window of codeunit objects.
ID Property
Local Property
FunctionType Property (Upgrade Codeunits)
FunctionType Property (Test Codeunits)
HandlerFunctions Property
TransactionModel Property
TryFunction Property
Event Property
EventFunction Property
EventPublisherObject Property
EventType Property
GlobalVarAccess Property
IncludeSender Property
EventPublisherElement Property

C/AL Locals Variables Properties


The following properties apply to Variables in the C/AL Locals window of codeunit objects.
Dimensions Property
ID Property
OptionString Property
RunOnClient Property
SuppressDispose Property
Temporary Property

C/AL Locals Text Constants Properties


The following properties apply to Text Constants in the C/AL Locals window of codeunit objects.
ConstValue Property
ConstValueML Property
ID Property

C/AL Locals Parameters Properties


The following properties apply to Parameters in the C/AL Locals window of codeunit objects.
Dimensions Property
ID Property

C/AL Locals Return Values Properties


The following properties apply to Return Values in the C/AL Locals window of codeunit objects.
Dimensions Property
ID Property
MenuSuite Properties in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This topic lists properties that apply to the MenuSuite object.

Menu Properties
The following properties apply to menus on a MenuSuite object.
Bitmap Property
Caption Property
CaptionML Property

Menu Item Properties


1. AccessByPermission Property
2. Caption Property
3. CaptionML Property

See Also
Properties
MenuSuites
Page Properties in Microsoft Dynamics NAV
1/2/2018 • 2 min to read • Edit Online

This topic lists properties that apply to the page object, controls, and actions on a page.

Page Object Properties


The following properties apply to a Page object.
AutoSplitKey Property
Caption Property
CaptionML Property
CardPageID Property
DataCaptionExpr Property
DataCaptionFields Property
DelayedInsert Property
DeleteAllowed Property
Description Property
Editable Property
InsertAllowed Property
ID Property
InstructionalTextML Property
LinksAllowed Property
ModifyAllowed Property
MultipleNewLines Property
Name Property
PageType Property
Permissions Property
PopulateAllFields Property
PromotedActionCategoriesML Property
RefreshOnActivate Property
SaveValues Property
ShowFilter Property
SourceTable Property
SourceTableTemporary Property
SourceTableView Property

Container Control Properties


The following properties apply to Container controls on a page.
Caption Property
CaptionML Property
ContainerType Property
Description Property
ID Property
Name Property

Group Control Properties


The following properties apply to Group controls on a page.
Caption Property
CaptionML Property
Description Property
Editable Property
Enabled Property
FreezeColumnID Property
GroupType Property
ID Property
IndentationColumnName Property
IndentationControls Property
InstructionalTextML Property
Layout Property
Name Property
ShowAsTree Property
Visible Property

Field Control Properties


The following properties apply to Field controls on a page.
AccessByPermission Property
ApplicationArea Property
AssistEdit Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
CharAllowed Property
ClosingDates Property
ColumnSpan Property
ControlAddin Property
DateFormula Property
DecimalPlaces Property
Description Property
DrillDown Property
DrillDownPageID Property
Editable Property
Enabled Property
ExtendedDataType Property
HideValue Property
ID Property
Importance Property
Lookup Property
LookupPageID Property
MaxValue Property
MinValue Property
MultiLine Property
Name Property
NotBlank Property
Numeric Property
OptionCaption Property
OptionCaptionML Property
QuickEntry Property
RowSpan Property
ShowCaption Property
ShowMandatory Property
SourceExpr Property
Style Property
StyleExpr Property
TableRelation Property
ToolTip Property
ToolTipML Property
ValuesAllowed Property
Visible Property
Width Property

Part Control Properties


The following properties apply to Part controls on a page.
AccessByPermission Property
ApplicationArea Property
Caption Property
CaptionML Property
ChartPartID Property
Description Property
Editable Property
Enabled Property
ID Property
Name Property
PagePartID Property
PartType Property
ProviderID Property
ShowFilter Property
SubPageLink Property
SubPageView Property
SystemPartID Property
ToolTip Property
ToolTipML Property
UpdatePropagation Property
Visible Property

ActionContainer Properties
The following properties apply to ActionContainer on a page.
Caption Property
CaptionML Property
Description Property
ID Property
Name Property

ActionGroup Properties
The following properties apply to ActionGroups.
Caption Property
CaptionML Property
Description Property
Enabled Property
ID Property
Image Property
Name Property
Visible Property

Action Properties
The following properties apply to Actions.
AccessByPermission Property
ApplicationArea Property
Caption Property
CaptionML Property
Description Property
Ellipsis Property
Enabled Property
ID Property
Image Property
InFooterBar Property
Name Property
Promoted Property
PromotedCategory Property
PromotedIsBig Property
PromotedOnly Property
RunPageLink Property
RunPageMode Property
RunPageOnRec Property
RunPageView Property
RunObject Property
Scope Property
ShortCutKey Property
ToolTip Property
ToolTipML Property
Visible Property

Separator Properties
The following properties apply to Separators.
Caption Property
CaptionML Property
ID Property
IsHeader

See Also
Properties
Query Properties
1/2/2018 • 1 min to read • Edit Online

This topic lists properties that apply to the query object.

Query Object Properties


The following properties apply to the query object as a whole.
Caption Property
CaptionML Property
Description Property
ID Property
Name Property
OrderBy Property
Permissions Property
TopNumberOfRows Property
ReadState Property

Query Data Item Properties


The following properties apply to the DataItem control of a query.
DataItemTable Property
DataItemLink Property (Query)
DataItemLinkType Property
Description Property
DataItemTableFilter Property
ID Property
Indentation Property (Query)
Name Property

Query Column Properties


The following properties apply to the Column control of a query.
Caption Property
CaptionML Property
ColumnFilter Property
DataSource Property
Description Property
ID Property
Indentation Property (Query)
Method Property
MethodType Property
Name Property
ReverseSign Property

Query Filter Control Properties


The following properties apply to the Filter control of a query.
Caption Property
CaptionML Property
ColumnFilter Property
DataSource Property
Description Property
ID Property
Indentation Property (Query)
Name Property
Report Properties in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This topic lists properties of the report object.

Report Object Properties


The following properties apply to the report object.
Caption Property
CaptionML Property
Description Property
EnableExternalAssemblies Property
EnableExternalImages Property
EnableHyperlinks Property
ID Property
Name Property
PaperSourceDefaultPage Property
PaperSourceFirstPage Property
PaperSourceLastPage Property
Permissions Property
ProcessingOnly Property
ShowPrintStatus Property
TransactionType Property
UseRequestPage Property
UseSystemPrinter Property
PDFFontEmbedding Property

DataItem Properties
The following properties apply to DataItem controls of a report object.
CalcFields Property
DataItemLink Property (Reports)
DataItemLinkReference Property
DataItemTable Property
DataItemTableView Property
ID Property
Indentation Property (Reports)
MaxIteration Property
Name Property
PrintOnlyIfDetail Property
ReqFilterFields Property
ReqFilterHeading Property
ReqFilterHeadingML Property
Temporary Property (Reports)

Column Properties
The following properties apply to Column controls of a report object.
AutoCalcField Property
AutoFormatExpr Property
AutoFormatType Property
DecimalPlaces Property
Description Property
ID Property
IncludeCaption Property
Indentation Property (Reports)
Name Property
OptionCaption Property
OptionCaptionML Property
OptionString Property
SourceExpr Property

Report Label Properties


The following properties apply to Report Labels of a report object.
Caption Property
CaptionML Property
Description Property
ID Property
Name Property

See Also
Properties
Table Properties in Microsoft Dynamics NAV
3/7/2018 • 7 min to read • Edit Online

The following topic lists properties that apply to the table object.

Table Object Properties


The following properties apply to a Table object.
Caption Property
CaptionML Property
DataCaptionFields Property
DataClassification Property
DataPerCompany Property
Description Property
DrillDownPageID Property
ID Property
LinkedObject Property
LookupPageID Property
Name Property
ObsoleteReason Property
ObsoleteState Property
PasteIsValid Property
Permissions Property
TableType Property

BLOB Properties
The following properties apply to the BLOB field of a table object.
AccessByPermission Property
Caption Property
CaptionML Property
Compressed Property
Data Type Property
DataClassification Property
Description Property
Enabled Property
Field No. Property
Name Property
ObsoleteReason Property
ObsoleteState Property
Owner Property
SubType Property (BLOB )

BigInteger Properties
The following properties apply to the BigInteger field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
AutoIncrement Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Boolean Properties
The following properties apply to the Boolean field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

Code Properties
The following properties apply to the Code field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
CharAllowed Property
Data Type Property
DataClassification Property
DataLength Property
DateFormula Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
Numeric Property
ObsoleteReason Property
ObsoleteState Property
SQL Data Type Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Date Properties
The following properties apply to the Date field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
Caption Property
CaptionClass Property
CaptionML Property
ClosingDates Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

DateFormula Properties
The following properties apply to the DateFormula field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
ObsoleteReason Property
ObsoleteState Property
NotBlank Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

DateTime Properties
The following properties apply to the DataTime field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

Decimal Properties
The following properties apply to the Decimal field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Duration Properties
The following properties apply to the Duration field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
Standard Day-Time Unit Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

GUID Properties
The following properties apply to the GUID field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

Integer Properties
The following properties apply to the Integer field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Media Properties
The following properties apply to the Media field of a table object.
AccessByPermission Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property

MediaSet Properties
The following properties apply to the MediaSet field of a table object.
AccessByPermission Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property

OemCode Properties
The following properties apply to the OemCode field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
CharAllowed Property
Data Type Property
DataClassification Property
DataLength Property
DateFormula Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
Numeric Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
SQL Data Type Property
Width Property

OemText Properties
The following properties apply to the OemText field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
CharAllowed Property
Data Type Property
DataClassification Property
DataLength Property
DateFormula Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
Numeric Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Option Properties
The following properties apply to the Option field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
BlankZero Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
OptionCaption Property
OptionCaptionML Property
OptionString Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

RecordID Properties
The following properties apply to the RecordID field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

TableFilter Properties
The following properties apply to the TableFilter field of a table object.
AccessByPermission Property
Caption Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Enabled Property
Field No. Property
Name Property
ObsoleteReason Property
ObsoleteState Property
TableIDExpr Property

Text Properties
The following properties apply to the Text field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
Caption Property
CaptionClass Property
CaptionML Property
CharAllowed Property
Data Type Property
DataClassification Property
DataLength Property
DateFormula Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
Name Property
NotBlank Property
Numeric Property
ObsoleteReason Property
ObsoleteState Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property
Width Property

Time Properties
The following properties apply to the Time field of a table object.
AccessByPermission Property
AltSearchField Property
AutoFormatExpr Property
AutoFormatType Property
BlankNumbers Property
Caption Property
CaptionClass Property
CaptionML Property
Data Type Property
DataClassification Property
Description Property
Editable Property
Enabled Property
ExtendedDataType Property
Field No. Property
FieldClass Property
InitValue Property
MaxValue Property
MinValue Property
Name Property
NotBlank Property
ObsoleteReason Property
ObsoleteState Property
SignDisplacement Property
TableRelation Property
TestTableRelation Property
ValidateTableRelation Property
ValuesAllowed Property

See Also
Properties
XMLport Properties in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This topic lists properties of the XMLport object, element, and attribute.

XMLport Object Properties


The following properties apply to the XMLport object.
Caption Property
CaptionML Property
CurrentPath Property
DefaultFieldsValidation Property
DefaultNamespace Property
Direction Property
Encoding Property
FileName Property
Format Property
Format-Evaluate Property
ID Property
InlineSchema Property
Name Property
NamespacePrefix Property
Namespaces Property
Permissions Property
PreserveWhiteSpace Property
TextEncoding Property (XMLports)
TransactionType Property
UseDefaultNamespace Property
UseLax Property
UseRequestPage Property
XMLVersionNo Property

Text Element Properties


The following properties apply to Text elements of an XMLport object.
Indentation Property (XMLports)
MaxOccurs Property
MinOccurs Property
NodeName Property
NodeType Property
SourceType Property
TextType Property
Unbound Property
VariableName Properties
Width Property (XMLport)

Table Element Properties


The following properties apply to Table elements of an XMLport object.
AutoReplace Property
AutoSave Property
AutoUpdate Property
CalcFields Property
Indentation Property (XMLports)
LinkFields Property
LinkTable Property
LinkTableForceInsert Property
MaxOccurs Property
MinOccurs Property
NodeName Property
NodeType Property
ReqFilterFields Property
ReqFilterHeading Property
ReqFilterHeadingML Property
SourceTable Property (XMLports)
SourceTableView Property (XMLports)
SourceType Property
Temporary Property (XMLports)
VariableName Properties
Width Property (XMLport)
Field Element Properties
The following properties apply to Field elements of an XMLport Object.
AutoCalcField Property
FieldValidate Property
Indentation Property (XMLports)
MaxOccurs Property
MinOccurs Property
NodeName Property
NodeType Property
SourceField Property
SourceType Property
Unbound Property
Width Property (XMLport)

Text Attribute Properties


The following properties apply to Text attributes of an XMLport object.
Indentation Property (XMLports)
NodeName Property
NodeType Property
Occurrence Property
SourceType Property
TextType Property
VariableName Properties
Width Property (XMLport)

Table Attribute Properties


The following properties apply to Table attributes of an XMLport object.
AutoReplace Property
AutoSave Property
AutoUpdate Property
CalcFields Property
Indentation Property (XMLports)
LinkFields Property
LinkTable Property
LinkTableForceInsert Property
NodeName Property
NodeType Property
Occurrence Property
ReqFilterFields Property
ReqFilterHeading Property
ReqFilterHeadingML Property
SourceTable Property (XMLports)
SourceTableView Property (XMLports)
SourceType Property
Temporary Property (XMLports)
VariableName Properties
Width Property (XMLport)

Field Attribute Properties


The following properties apply to Field attributes of an XMLport object.
AutoCalcField Property
FieldValidate Property
Indentation Property (XMLports)
NodeName Property
NodeType Property
Occurrence Property
SourceField Property
SourceType Property
Width Property (XMLport)

See Also
Properties
VariableName Properties
1/2/2018 • 1 min to read • Edit Online

Sets a variable name for the table that you have specified in the SourceTable Property. It is also used to specify a
variable name for a text that you have specified in the SourceType Property.

Applies To
XMLports

Remarks
The text or table variables that you define here act the same way as variables that are defined in the C/AL Globals
window. However, these variables are only visible in the C/AL Symbol Menu.
The values of the VariableName and SourceTable Property correspond to the contents of the DataSource field in
XMLport Designer. The values that you enter in these properties in the Properties window are shown in the
DataSource field in XMLport Designer.
If you have defined a text variable, you can only see the name of the text variable in the DataSource field in
XMLport Designer.
If you have defined a table as an XML item, the DataSource field can display the following information.
Properties window:
SourceTable
Customer
Customer
VariableName
<Customer> default
Cust.
XMLport Designer:
DataSource field
<Customer> (Customer)
Cust. <Customer>

See Also
SourceTable Property
SourceType Property
Key Properties
1/2/2018 • 1 min to read • Edit Online

The keys associated with a table have properties that describe their behavior, just as tables and fields do. When you
create a key, Dynamics NAV automatically suggests a number of default values for these properties. Depending on
the purpose of the key, you will sometimes want to change these default values.
Dynamics NAV contains the following properties for keys.

PROPERTY NAME USE

Enabled Property Determines whether the system will maintain an index for the
key. You cannot use a key unless it is enabled.

Key Property Defines the key.

SumIndexFields Property Determines the fields for which the system will maintain a
SumIndex.

MaintainSQLIndex Property Determines whether a SQL Server index corresponding to the


Dynamics NAV key should be created.

MaintainSIFTIndex Property Determines whether SIFT structures should be created in SQL


Server to support the corresponding SumIndexFields for the
Dynamics NAV key.

Clustered Property Sets a value that indicates whether the index is clustered.

SQLIndex Property Sets the actual fields that are used in the corresponding index
on SQL Server.

See Also
How to: View or Modify Properties on a Key
Table Keys
Development Environment Commands
1/2/2018 • 1 min to read • Edit Online

Dynamics NAV includes the finsql.exe file that enables you to perform certain tasks from a command prompt. The
finsql.exe is an executable file that runs the development environment. By default, finsql.exe is located at
C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\.
The finsql.exe has several commands that you can use to perform the tasks that are described in the following
table:

COMMAND TASK

BuildVirtualMetadata Regenerates C# and metadata information for virtual tables in


a specified database.

CreateDatabase Create a new Dynamics NAV database.

UpgradeDatabase Upgrades the specified Dynamics NAV database on the


specified server.

CompileObjects Compile Dynamics NAV objects from a specified database.

DeleteObjects Delete Dynamics NAV objects from a specified database.

DesignObject Open a specified Dynamics NAV object for design in the


development environment.

ExportObjects Export Dynamics NAV objects from a specified database.

ImportObjects Import Dynamics NAV objects from a file to a specified


database.

CreateLanguage Create language captions on Dynamics NAV objects in a


specified database.

ExportLangModule Export a Dynamics NAV language module from a specified


database.

ImportLangModule Import a Dynamics NAV language module to a specified


database.

ExportTranslate Export text strings from a specified database to a file.

ImportTranslate Import text strings from a file to a specified database.

GetBuildVersion Gets the Dynamics NAV product name and build version.
NOTE
To compile objects, design objects, or import and export objects as .txt files, you must have a developer license. For all other
tasks, you can have either an end-user license or a developer license.

See Also
Using the Development Environment from the Command Prompt
Development in AL
4/16/2018 • 3 min to read • Edit Online

TIP
We've moved AL developer documentation for Dynamics 365 Business Central! Visit our new library for AL documentation
here!
You'll still find a bit of AL content here that applies to Dynamics NAV.
Differences in the Development Environments
3/23/2018 • 2 min to read • Edit Online

Coming from the Dynamics NAV Development Environment and C/SIDE, there are some differences and
optimizations that you should familiarize yourself with. The following sections go through these changes.

Data types
C/SIDE AL LANGUAGE DEVELOPMENT ENVIRONMENT

Dates are parsed based on culture settings. Locale independent and supports only: yyyy-mm-ddD .

Boolean values could be expressed as yes/no. Boolean values are expressed as true/false.

For tables, integers could allow decimal values. For example, For tables, Min, Max, InitValue numbers with a fraction are
5.0 converts to an integer, 5.4 throws an error at runtime. expressed as decimal , thus they are not a valid integer data
type.

The largest constant integer could be 999999999999999 . Transforms to 999'999'999'999'999.0 , a decimal value. In
AL, this can be expressed as 999999999999999.0 or
999999999999999L .

Syntax updates
C/SIDE AL LANGUAGE DEVELOPMENT ENVIRONMENT

The token for multilanguage comment is @@@. A multilanguage comment is marked with Comment.

Supports TryFunction on code developed in C/SIDE. Supports calling referenced TryFunctions from W1.

Several properties have been renamed, to mention some:

C/SIDE AL LANGUAGE DEVELOPMENT ENVIRONMENT

AutoFormatExpr AutoFormatExpression

DataCaptionExpr DataCaptionExpression

Layout GridLayout

ProviderID Provider

NOTE
Property values are considered as syntax elements; thus they should follow the standard AL escaping rules.

Multilanguage properties
With the introduction of .xliff files, the ML properties, such as CaptionML and TooltipML will be deprecated in a
later version. Use the equivalent properties instead, such as Caption and Tooltip, then make sure the manifest is
set up to generate the /Translations folder and use the generated .xliff files for translations of the extension. For
more information, see Working with Translation Files.

Pages
The ActionContainer elements in AL have been renamed; the following table lists the renamed elements:

C/SIDE AL LANGUAGE DEVELOPMENT ENVIRONMENT

ActionItems Processing

ActivityButtons Sections

HomeItems Embedding

NewDocumentItems Creation

RelatedInformation Navigation

Reports Reporting

For instance, area(Sections) can be defined inside the actions section of the page.
Likewise, Container and ContainerType elements in C/SIDE have been renamed to
area(Content|FactBoxes|RoleCenter) and can be defined inside the layout section of the page.

NOTE
For backwards compatibility we continue to support adding non-part pages as parts. We do, however, recommend that you
redesign your page to only use Card part or List part, as we may remove support in a future update.

For syntax examples, see Page Object.

Naming
Controls, actions, and methods names must be unique on pages. In C/SIDE, you could create a Part control with
the same name as a method, which would give you an error at runtime. This is now prevented, by disallowing
duplicates. Similarly, trigger and trigger event names are disallowed on matching application object types.
Likewise, actions and fields could have same names before, but that would have prevented page testability access,
and will now throw a compilation error.

NOTE
Name on Controls and Actions on Pages is now mandatory.

Property dependencies
Some properties require that you set another property. An example is PromotedCategory , which requires that you
have enabled the property Promoted . The following table lists some of the properties that have this dependency.
PROPERTY DEPENDS ON THE PROPERTY...

PromotedCategory Promoted

PromotedIsBig Promoted

ValidateTableRelation TableRelation

SourceTableTemporary SourceTable

RunPageMode RunObject

Limited functionality
The InitValue property of type Duration is not allowed in new development environment.
The InitValue of type DateTime only allows for the value 0DT .

See Also
Developing Extensions
Getting Started with AL
AL Development Environment
Running C/SIDE and AL Side-by-Side
4/16/2018 • 1 min to read • Edit Online

Dynamics NAV 2018 supports development using both C/SIDE and AL, as well as Designer side-by-side. When
new objects are added or changed in C/SIDE these changes must be reflected in the symbol download in Visual
Studio Code using the AL Language extension. To enable this reflection, a new command and argument has been
added to finsql.exe called generatesymbolreference , run it as illustrated below.

Get started generating symbols and compiling all objects


Use the generatesymbolreference command specified with the database and server name. This command will add
symbol references to the Object Metadata table for the specified database.

IMPORTANT
Run this command at least once to have a set of symbol references.

Syntax example

finsql.exe Command=generatesymbolreference, Database="Demo Database NAV (11-0)", ServerName=.\NAVDEMO

NOTE
This is a lengthy operation.

Continuously generate symbols each time you compile objects in


C/SIDE
Use generatesymbolreference set to yes as a command line argument each time you start finsql.exe to have all
compilations add a symbol reference to the Object Metadata table. The default setting of the argument is no.

NOTE
If you make changes in C/SIDE and start the C/SIDE development environment without the generatesymbolreference flag
set to yes , no symbols will be generated when downloading symbols from Visual Studio Code.

Syntax example

finsql.exe generatesymbolreference=yes

Dynamics NAV Server setting


To allow any symbol generation, you must also enable the EnableSymbolLoadingAtServerStartup setting in the
Dynamcis NAV server settings. For more information, see Configuring Microsoft Dynamics NAV Server.
If the setting is not enabled, the generatesymbolreference setting does not have any effect.
See Also
Developing Extensions
Creating runtime packages for Dynamics NAV
5/14/2018 • 1 min to read • Edit Online

For distribution of extensions, you can generate runtime packages that do not contain AL code, but only the final
artifacts used by the server at runtime. Runtime packages allow you to protect the intellectual property
represented by your AL source code. The extension in a runtime package can be installed on servers that do not
have a developer license. The license is checked on the server where the runtime package is generated.

Start using runtime packages


The first step in using runtime packages is to have an extension developed and published to an on-premise
instance. Next, use the following PowerShell command to connect to the server, find the extension, and download
the runtime package.
Get-NavAppRuntimePackage

For more information about this cmdlet, see Get-NAVAppRuntimePackage cmdlet.


The following example gets the NAV App runtime package with the provided name and version.
Get-NAVAppRuntimePackage -ServerInstance DynamicsNAV -AppName 'Proseware SmartApp' -Version 2.3.4.500 -
ExtensionPath 'Prosware SmartApp_2.3.4.500_runtime.app'

For publishing and installing the package, use the Publish-NavApp and the Install-NAVApp PowerShell cmdlets.

Limitations
The limitation of runtime packages is that they only work for on-premise installations and therefore cannot be
submitted to AppSource. Moreover, the debugging experience is very limited since no source code is available.

See also
Publish-NAVApp cmdlet
Install-NAVApp cmdlet
Installing AL with Microsoft Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

To add the AL development environment capability with Dynamics NAV you must first do a custom installation
and select Modern Development Environment. For more information, see Custom Option.
After the installation is done, to use the AL Language extension, follow these steps:
1. Download and install Visual Studio Code.
2. Open Visual Studio Code, and then from the Extensions menu, choose Install from VSIX
3. From the equivalent folder of
C:\Program Files(x86)\Microsoft Dynamics NAV\110\Modern Development Environment\ locate the ALLanguage.vsix
file and install it.

TIP
To run both AL and C/SIDE see Running C/SIDE and AL Side-by-Side.

See Also
Custom Option
Differences in the Development Environments
Working with Administration Tools
3/7/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV 2018 provides different tools for different administration tasks.

TO SEE

Learn about the Microsoft Dynamics NAV Server Microsoft Dynamics NAV Server Administration Tool
Administration Tool, a Microsoft Management Console snap-
in that you use to create and manage Microsoft Dynamics
NAV Server instances.

Perform administration tasks with the Dynamics NAV Microsoft Dynamics NAV Windows PowerShell Cmdlets
Windows PowerShell cmdlets.

Use the Microsoft Dynamics NAV Development Environment Administration in the Development Environment
to manage licenses, databases, and companies.

Optimize performance when accessing Dynamics NAV data Optimizing SQL Server Performance with Microsoft Dynamics
from SQL Server. NAV

Monitor your Microsoft Dynamics NAV Server instances. Monitoring Microsoft Dynamics NAV Server

Connect Microsoft Dynamics NAV Windows client to Connecting the Microsoft Dynamics NAV Clients over a Wide
Microsoft Dynamics NAV Server over a wide area network. Area Network

Learn about classifying data for compliance. Classifying Data

See Also
Deployment
Security and Protection
Microsoft Dynamics NAV Server Administration Tool
1/2/2018 • 3 min to read • Edit Online

The Microsoft Dynamics NAV Server Administration tool is a Microsoft Management Console (MMC ) snap-in
for creating and managing Microsoft Dynamics NAV Server instances. When you install the Server Option on a
computer, the Microsoft Dynamics NAV Server Administration tool is one of the default features. The Microsoft
Dynamics NAV Server Administration tool is also an option when you install the Client Option, although it is not
one of the default components.
You typically run the Microsoft Dynamics NAV Server Administration tool by choosing Microsoft Dynamics
NAV Administration from the Start menu. For some scenarios, however, you may need to open the MMC first
and then add the Dynamics NAV snap-in. For example, see How to: Administer Multiple Microsoft Dynamics
NAV Server Computers. In this case, choose Run from the Start menu and then specify the Microsoft
Management Console:

mmc

IMPORTANT
Only members of the Administrator group on the computer are able to use the Microsoft Dynamics NAV Server
Administration tool.

IMPORTANT
The Microsoft Dynamics NAV Server Administration tool is not supported for multi-user environments.

To learn more about how to use Microsoft Dynamics NAV Server Administration tool, see one of the following
topics:

TO SEE

Learn about the different tools and options for administering Administration
Microsoft Dynamics NAV 2018.

Administer a remote Microsoft Dynamics NAV Server How to: Administer a Remote Microsoft Dynamics NAV
computer. Server Computer

Administer multiple Microsoft Dynamics NAV Server How to: Administer Multiple Microsoft Dynamics NAV Server
computers from a single administrative console. Computers

Create a Microsoft Dynamics NAV Server instance. How to: Create a Microsoft Dynamics NAV Server Instance

Mount a tenant on a Microsoft Dynamics NAV Server How to: Mount or Dismount a Tenant on a Microsoft
instance that is configured for multitenancy. Dynamics Server Instance

Manage Microsoft Dynamics NAV Server instances. Managing Microsoft Dynamics NAV Server Instances
TO SEE

Manage settings for a Microsoft Dynamics NAV Server Microsoft Dynamics NAV Server Settings
instance.

Configure Microsoft Dynamics NAV Server settings. Configuring Microsoft Dynamics NAV Server

TIP
You can also administrate your Dynamics NAV deployment using Windows PowerShell cmdlets. For more information, see
Microsoft Dynamics NAV Windows PowerShell Cmdlets.

Navigating the Microsoft Dynamics NAV Server Administration Tool


Microsoft Dynamics NAV Server Administration tool is divided into three panes:
The left pane shows a tree view that lists all Microsoft Dynamics NAV Server computers that you are
administering from this computer and all Microsoft Dynamics NAV Server instances on those computers.
The first time that you run Microsoft Dynamics NAV Server Administration tool, the view is collapsed. You
only see the local server computer without any Microsoft Dynamics NAV Server instances listed.

Choose Microsoft Dynamics NAV (Local), under Console Root, in the left pane of the Microsoft
Dynamics NAV Server Administration tool, to display all Microsoft Dynamics NAV instances on the
server computer in the center pane:

For information about how to manage Microsoft Dynamics NAV Server instances, see Managing
Microsoft Dynamics NAV Server Instances.
The center pane shows information about the item that you have selected in the left pane. When the
selected item is a computer running Microsoft Dynamics NAV Server, the center pane shows a list of
Microsoft Dynamics NAV Server instances on that computer and the status of each instance (running or
stopped), and the name of the account the instance is running under.
When the item selected in the left pane is a Microsoft Dynamics NAV Server instance, the center pane
shows the settings for that instance. For information about how settings are organized in the center pane,
see Microsoft Dynamics NAV Server Settings. For information about a specific setting, see Configuring
Microsoft Dynamics NAV Server.
If the Microsoft Dynamics NAV Server is configured for multitenancy, then you can expand the Microsoft
Dynamics NAV Server instance items in the left pane to display a Tenants item. Select the Tenants item
to display all the tenants that are mounted on a Microsoft Dynamics NAV Server instance in the center
pane. For more information, see Multitenant Deployment Architecture
The right pane displays available actions for the object that is selected in the left pane. These options
differ depending on whether a Microsoft Dynamics NAV Server computer or a Microsoft Dynamics NAV
Server instance is selected.
The Windows PowerShell History pane lists the Windows PowerShell commands that the equivalent of
the tasks you perform in the Microsoft Dynamics NAV Server Administration tool. You can access the
Windows PowerShell History pane from the Actions menu and from the right pane. To run a command
that is shown in the Windows PowerShell History pane, you can copy the command and paste it into
the Microsoft Dynamics NAV Administration Shell, for example.
Microsoft Dynamics NAV Windows PowerShell
Cmdlets
5/22/2018 • 3 min to read • Edit Online

Microsoft Dynamics NAV 2018 includes Windows PowerShell cmdlets for administration and for development
and file management of application object files and extension packages. The cmdlets are available in two
Windows PowerShell modules: Microsoft Dynamics NAV Administration Shell and Microsoft Dynamics NAV
Development Shell.
The Microsoft Dynamics NAV Administration Shell includes cmdlets for administering the Dynamics
NAV deployment, such as adding and configuring Dynamics NAV server instances, databases, and users.
Also included are cmdlets for administering extension packages. The Microsoft Dynamics NAV
Administration Shell is installed with the Microsoft Dynamics NAV Server.
The Microsoft Dynamics NAV Development Shell includes cmdlets for merging and modifying
application object files. Also included are cmdlets for creating extension packages. The Microsoft
Dynamics NAV Development Shell is installed with the Microsoft Dynamics NAV Development
Environment.
The cmdlets are implemented in Windows PowerShell 3.0, which is included with Windows Server 2012 and
Windows 8 and later. For other versions of Windows supported for Microsoft Dynamics NAV 2018, you can
install it as part of the Windows Management Framework 3.0 on the Microsoft Download Center.

IMPORTANT
Cmdlets can perform actions that can also be done from the client, such as creating and modifying entities like web
services, companies, users, and more. Be aware that cmdlets do not execute code on application objects (such as tables or
pages) that are associated with these entities. If you have added logic to these application objects, the logic will be ignored
by the cmdlets. For example, if you added logic on table 9900 Web Service Aggregate to control the creation of web
services, although this logic will run from the client, it will be ignored when creating web services by using the New-
NAVWebService cmdlet.

Starting a Microsoft Dynamics NAV Administration Shell Session


You must run the Microsoft Dynamics NAV Administration Shell as an Administrator. On the computer that is
running Microsoft Dynamics NAV Server, choose Start, in the Search box, type Microsoft Dynamics NAV
Administration Shell, right-click the related link, and then choose Run as Administrator.

IMPORTANT
To run the cmdlets in the Microsoft Dynamics NAV Administration Shell, you must be a member of the local Administrator
group on the computer where the Microsoft Dynamics NAV Administration Shell is installed.

Starting a Microsoft Dynamics NAV Development Shell Session


On the computer that is running Microsoft Dynamics NAV Development Environment, choose Start, in the
Search box, type Microsoft Dynamics NAV Development Shell, and then choose the related link.
Getting Help on Dynamics NAV Cmdlets
To see the cmdlets that are available for Dynamics NAV, type the following at the Windows PowerShell prompt.

Get-Command *NAV*

To get Help about syntax and options for a specific cmdlet, type the following cmdlet.

Get-Help <cmd name>

For example, to get Help about the Get-NAVServerInstance cmdlet, type the following.

Get-Help Get-NAVServerInstance

To get online Help in the MSDN Library for a specific cmdlet, type the following cmdlet.

Get-Help <cmd name> -online

NOTE
The cmdlet help for Microsoft Dynamics NAV 2017 is currently not available in the MSDN Library. The -online switch
parameter will open the Microsoft Dynamics NAV 2016 version of the help in the MSDN Library instead. For the latest
cndlet help, use the cmdlet help in command-line interface (by omitting -online switch parameter).

For more information about Microsoft Dynamics NAV Administration Shell cmdlets, see Administration
Cmdlets for Microsoft Dynamics NAV and Administration Cmdlets for Microsoft Dynamics NAV Extensions.
For more information about Microsoft Dynamics NAV Development Shell cmdlets, see Development Cmdlets
for Microsoft Dynamics NAV and Development Cmdlets for Microsoft Dynamics NAV Extensions.
For more information about Windows PowerShell, see Windows PowerShell Getting Started Guide.

See Also
Sample Windows PowerShell Scripts for Microsoft Dynamics NAV
Administration
Comparing and Merging Application Object Source Files
Managing Users in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

Depending on your Dynamics NAV solution, users and their access to the solution is managed in different ways.
The users must have an account to access Dynamics NAV, but their experience inside the solution is controlled by
user groups, permissions, and licenses.

Dynamics NAV Users and Credential Types


Microsoft Dynamics NAV 2018 supports four credential authorization mechanisms for Dynamics NAV users.
When you create a user, you provide different information depending on the credential type you are using in the
current Microsoft Dynamics NAV Server instance. For more information, see Users and Credential Types.

In This Section
See Also
How to: Create Microsoft Dynamics NAV Users
Managing User Groups
How to: Set Up User Time Constraints
Users and Credential Types
Profiles and Role Centers
Managing Permissions and Permission Sets
About Permissions Security and Protection
Managing Companies
Managing Companies in Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

In this section, you can read more about how to manage companies in Dynamics NAV.
You can create, rename, and delete companies in Microsoft Dynamics NAV Windows client, Microsoft Dynamics
NAV Web client, or by using the Microsoft Dynamics NAV Administration Shell. You can only create, rename, or
delete a company if you have the relevant permission for the specified company or for all companies.

In This Section
How to: Create Companies
How to: Rename Companies
How to: Delete Companies
Related Sections
Managing Users
Profiles and Role Centers

See Also
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Classifying Data in Dynamics NAV
4/26/2018 • 5 min to read • Edit Online

Dynamics NAV includes development features for tagging business data with specific classifications. Specifically,
this includes data that is stored in table fields of the database and telemetry data that is emitted from the
application.

About Data Classification


Classifying data serves different purposes. It can make data easier and more efficient to locate and retrieve, and
also help to add another layer of protection and security for handling private and sensitive data. It can supplement
your process for making the application compliant with legislative and regulatory requirements for collecting,
storing, and using personal information.

NOTE
You should consider the data classification features offered in Dynamics NAV as the first layer of classification - done by
developers (Dynamics NAV and partners) on customizations, add-ons, and extensions. The second layer is the users and
how they handle data they provide and that is made available to them.

What are the different data classifications?


The following table describes the different classifications that you can apply to data:

DATA CLASSIFICATION DESCRIPTION EXAMPLE

CustomerContent Content directly provided/created by Customer generated BLOB or


admins and users. structured storage data
Customer-owned/provided
secrets (passwords, certificates,
encryption keys, storage keys)

EndUserIdentifiableInformation (EUII) Data that identifies or could be User name or display name
used to identify the user of a Microsoft (DOMAIN\UserName)
service. EUII does not contain User principle name
Customer content. (name@company.com)
User-specific IP address

AccountData Customer billing information and Tenant administrator contact


payment instrument information, information (for example, tenant
including administrator contact administrator’s name, address,
information, such as tenant e-mail address, phone number)
administrator’s name, address, or Customer’s provisioning
phone number. information
DATA CLASSIFICATION DESCRIPTION EXAMPLE

EndUsePseudonymousIdentifiers (EUPI) An identifier created by User GUIDs, PUIDs, or SIDs


Microsoft tied to the user of a Session IDs
Microsoft service. When EUPI is
combined with other information, such
as a mapping table, it identifies the end
user. EUPI does not contain information
uploaded or created by the customer
(Customer content or EUII)

OrganizationIdentifiableInformation (OII) Data that can be used to identify a Tenant ID (non-GUID)


tenant, generally config or usage data. Domain name in e-mail address
This data is not linkable to a user and (xxx@contoso.com) or other
does not contain Customer content. tenant-specific domain
information

SystemMetadata Data generated while running the Database table names, database
service or program that is not linkable column names, entity names
to a user or tenant.

Classifying data in tables and fields


Table objects and field controls include the DataClassification property that you can use to tag data with one of
the classifications previously described.
Dynamics NAV operates with some standard rules for classification:
When you add a new field to a table, the field is assigned an initial value of ToBeClassified.
FlowField and FlowFilter fields are automatically set to the SystemMetadata data classification. This cannot
be changed.
Existing tables and fields (except for FlowFields and FlowFilters) in an application that has been upgraded from
a Dynamics NAV version without the DataClassification property, will automatically be assigned the
CustomerContent classification.

IMPORTANT
Microsoft is providing this DataClassification property as a matter of convenience only. It's your responsibility to classify
the data appropriately and comply with any laws and regulations that are applicable to you. Microsoft disclaims all
responsibility towards any claims related to your classification of the data.

For more information about this property, see DataClassification Property in C/AL.
Data classification on upgrade
When you upgrade an application from a Dynamics NAV version that does not contain the DataClassification
property, existing tables and fields (except for FlowFields and FlowFilters) will automatically be assigned the
CustomerContent classification. You can then access the DataClassification property on these tables and fields,
and change the classification as needed. FlowFields and FlowFilters will be assigned the SystemMetadata
classification automatically.
Bulk-classifying data
The Field Data Classification report, which is described in the Viewing current field classifications section in this
topic, provides an overview of the data classifications for fields. The report also lets you assign data classifications
for more than one field. For example, this is useful if you are assigning classifications for the first time, or have
changed several fields and want to update their classifications. You can bulk-edit classifications only for fields in
CSIDE. The script does not update fields in extensions.
To bulk-edit classifications, export the report to Excel, update the classifications, and then save your changes. Then,
in Windows PowerShell, run the following commands to run the Import-Module script and set the classifications
on the fields.
To run the script from the default folder on the DVD, run:

Import-Module WindowsPowerShellScripts\DataClassification\DataClassification.psm1

To update the DataClassification property, run the following command. Replace <FilePath> with the full path to
the client files. For example, C:\Program Files\Microsoft Dynamics NAV\110\RoleTailored Client.

Set-FieldDataClassificationFromExcelFile -ExcelFilePath "C:\NAV\W1 Fields (Main).xlsx" -SheetName 'Field Data


Classification' -RTCFolder "<FilePath>" -DBName Navision_NAV2 -OutputFolder C:\Nav2\Classifications

Viewing current field classifications


To view the data classification on all fields, you can do one of the following:
From Microsoft Dynamics NAV Development Environment, in the Tools menu, select Show Field Data
Classification.
From the client, search for and open the Field Data Classification page.
Create a page that has the virtual table Field (ID 2000000041) as its source, and open the page in the client.
To view the data classification on all tables, create a page that has the virtual table Table Metadata (ID
2000000136) as its source, and open the page in the client.

See Also
How to: Create a Page to View a Virtual Table
Transparent Data Encryption (TDE )
Administrating in the Dynamics NAV Development
Environment
1/2/2018 • 1 min to read • Edit Online

You can use the development environment to administer certain aspects of Dynamics NAV databases and licenses.
For more information, see the topics in this section.
For all other aspects of administration, see Microsoft Dynamics NAV Server Administration Tool.

See Also
Microsoft Dynamics NAV Server Administration Tool
Optimizing SQL Server Performance with Microsoft
Dynamics NAV
5/31/2018 • 1 min to read • Edit Online

The following articles describe how to optimize performance in Microsoft Dynamics NAV 2018 when accessing
data from the SQL Server database.
Data Access
Table Keys and Performance
Bulk Inserts
C/AL Database Functions and Performance on SQL Server
Query Objects and Performance
Troubleshooting: Analyzing Long Running SQL Queries Involving FlowFields by Disabling SmartSQL
Troubleshooting: Using Query Store to Monitor Query Performance in Dynamics NAV

See Also
Configuring Microsoft SQL Server
Microsoft SQL Server documentation
Monitoring Microsoft Dynamics NAV Server
5/31/2018 • 1 min to read • Edit Online

These articles describe the features for monitoring and troubleshooting Microsoft Dynamics NAV Server.
Tools for Monitoring Performance Counters and Events
Monitoring Microsoft Dynamics NAV Server Using Performance Counters
Monitoring Microsoft Dynamics NAV Server Events
Monitoring SQL Database Deadlocks
Monitoring Long Running SQL Queries to the Event Log
Troubleshooting: Using Query Store to Monitor Query Performance in Dynamics NAV

See Also
Monitoring SQL Database Locks
Configuring Microsoft SQL Server
Microsoft Dynamics NAV Performance Counters
1/2/2018 • 10 min to read • Edit Online

The following table describes the performance counters that are available in Dynamics NAV for monitoring
Microsoft Dynamics NAV Server instances.

Client session counters


These counters pertain to sessions from the clients, NAS, and web services, to the server instance.

COUNTER DESCRIPTION

# Active sessions Number of active sessions on the Microsoft Dynamics NAV


Server instance.

An active session is a connection to the Microsoft Dynamics


NAV Server instance from a Dynamics NAV client, such as the
Microsoft Dynamics NAV Windows client or Microsoft
Dynamics NAV Web client, and Web services (OData and
SOAP).

Server operations/sec Number of operations that have started on the Microsoft


Dynamics NAV Server per second.

An operation is a call to the Microsoft Dynamics NAV Server


instance from a Dynamics NAV client to run Dynamics NAV
objects.

Note: OData and SOAP requests are not included.

Average server operation time (ms) Average duration of server operations in milliseconds.

SQL Server connection counters


These counters pertain to the connection from the server instance to the SQL Server instance and databases.

COUNTER DESCRIPTION

# Mounted tenants Number of tenants that are mounted on the Microsoft


Dynamics NAV Server instance. This counter is relevant with a
multitenant server instance, where tenants are often mounted
and dismounted.

# Open connections The current number of open connections from the Microsoft
Dynamics NAV Server instance to Dynamics NAV databases on
SQL Servers.

The value is always equal to the sum of the # Open tenant


connections counter and the # Open application
connections counter. -We recommend that you use these
counters instead.
COUNTER DESCRIPTION

# Open application connections Current number of open application connections from the
Microsoft Dynamics NAV Server instance to the Dynamics
NAV application database on SQL Servers.

Because all connections are to only one application database,


you will see failures when the total number of connections for
all server instances exceeds the maximum number of
connections allowed to the database.

# Open tenant connections Current number of open tenant connections from the
Microsoft Dynamics NAV Server instance to Dynamics NAV
tenant databases on SQL Servers.

If there are multiple tenant databases, you cannot see the


distribution of opened connections per database (or database
pool).

With Azure SQL Database, connections are denied if the


throttling limit is reached. The limit depends on the database
configuration. Be aware that in clusters, other server instances
will also have connections to the same database, so the total
load on a database requires that you look at multiple server
instances.

% Query repositioning rate Percentage of queries that are re-executed when fetching the
query result.

Hard throttled connections Number of connections that were hard-throttled.

Soft throttled connections Number of connections that were soft-throttled.

Transient errors Number of transient errors.

Heartbeat time (ms) The time that it takes to complete a single write to a system
table. Conceptually, this counter measures the time it takes to
call the application database server to update the 'last active'
field the dbo.Service Instance table for the Microsoft
Dynamics NAV Server instance. Every 30 seconds, the instance
writes a record to indicate that the instance is "alive."

You can use this counter to indicate if there is network latency


between the Microsoft Dynamics NAV Server and the
database.

# Preferred connection total requests Count of the total number of requests to the preferred
connection cache. The preferred connection cache contains
requests from the SQL connection pool that was last used by
a Dynamics NAV user.

% Preferred connection cache hit rate Percentage of hits in the preferred connection cache,
compared to the total number of requests.

Data and caching counters


These counters pertain to the data caching on the server instance.
COUNTER DESCRIPTION

# Calculated fields cache total requests Count of the total number of requests to the calculated fields
cache. The calculated fields cache contains the results of
CALCFIELDS Function (Record) calls.

% Calculated fields cache hit rate Percentage of hits in the calculated fields cache, compared to
the total requests to the calculated fields cache.

# Command cache total requests Count of the total number of requests to the command cache.
The command cache contains the results of all SQL
commands.

% Command cache hit rate Percentage of hits in the command cache, compared to the
total requests to the command cache.

# Primary key cache total requests Count of the total number of requests to the primary key
cache. The primary key cache contains the results of requests
to get a record by using its primary key.

% Primary key cache hit rate Percentage of hits in the primary key cache, compared to the
total requests to the primary key cache.

# Result set cache total requests Count of the total number of requests to the result set cache.
The result set cache contains result sets that are returned from
SQL Server.

% Result set cache hit rate Percentage of hits in the result set cache, compared to the
total requests to the result set cache.

The value also depends on the usage pattern and which parts
of the application are is used. For example, the
SELECTLATESTVERSION function will clear the cache, which
results in a lower hit rate.

In general, reading frequently updated values will lower the hit


rate because the cache synchronization across Microsoft
Dynamics NAV Server instances will remove stale values, which
causes re-reads.

# Rows in all temporary tables Count of number of rows in all temporary tables.

Scheduled task counters


These pertain to tasks that are run by Task Scheduler.

COUNTER DESCRIPTION

# Available tasks Remaining number of tasks that can potentially run


simultaneously before the maximum number of tasks is
reached. The value of this counter is the value the Maximum
# of tasks counter minus the value of the # Running tasks
counter.
COUNTER DESCRIPTION

# of task errors/sec Number of errors per second that are caused by running
tasks. The task are causing errors in C/AL or exceptions on the
server instance. If the value is greater than zero for an
extended period of time, this typically indicates a failing task
that keeps getting rescheduled.

# Running tasks Number of tasks that are currently running on the server
instance. The value is limited to the value of the Maximum #
of tasks counter.

Average task execution time The average time (in ticks) that tasks have taken to complete.
Task execution time is counted regardless of whether the task
completed successfully or raised an error.

There is no general rule for what the normal operations level


is. To analyze this counter, look for large spikes to identify
long-running tasks.

Note: A tick is the smallest unit that the your system uses for
time measurements, and it is typically determined by the
operating system. For example, in Windows, a single tick
represents one hundred nanoseconds, which means that there
are 10,000 ticks in a millisecond. Tick durations can differ
bewteen systems, so be aware of this fact when comparing
absolute values across systems.

Maximum # of tasks The maximum number of tasks that can run simultaneously.
This value is defined by the Maximum Concurrent Running
Tasks (TaskSchedulerMaxConcurrentRunningTasks) setting in
the server instance configuration. Therefore, this value is
constant until the server instance setting is changed and the
instance is restarted.

Total # Pending tasks The total number of tasks in the shared task list that are
waiting to be picked up by server instances connected to this
application database. The tasks counted are those that are
ready and have been scheduled to run now or earlier and that
are not currently running.

Total # Running tasks Total number of tasks in the shared task list that are currently
running by any server instance connected to this application
database.

Time (ms) since the list of running tasks last had capacity for The time (ms) since the list of running tasks last had capacity
new tasks for new tasks.

For more information about task scheduler, see Task Scheduler.

See Also
How to: Set up Performance Counters in Windows Performance Monitor
How to: Create a Data Collector Set From the Microsoft Dynamics NAV Template
Optimizing SQL Server Performance with Microsoft Dynamics NAV
Monitoring Microsoft Dynamics NAV Server Events
3/7/2018 • 2 min to read • Edit Online

You can monitor events on Microsoft Dynamics NAV Server to diagnose conditions and troubleshoot problems
that affect operation and performance.

Event Logging Overview


Dynamics NAV uses Event Tracing for Windows (ETW ), which is a subsystem of Windows operating systems.
ETW provides a tracing mechanism for events that are raised by an application or service. ETW enables you to
use industry standard tools such as Windows Performance Monitor, PerfView, Event Viewer, and Windows
PowerShell to dynamically collect data on trace events that occur on the Microsoft Dynamics NAV Server.
Events that occur on Microsoft Dynamics NAV Server instances are recorded in Windows Event logs on the
Microsoft Dynamics NAV Server computer. Microsoft Dynamics NAV 2018 uses channels on all events. Event
channels provide a way to collect and view events from a specific provider, which in this case is Microsoft
Dynamics NAV Server, and group the events according to predefined types, such as admin, operational, and
debug. For example, in Event Viewer, Microsoft Dynamics NAV Server instance events are collected in the
Admin, Operational, and Debug channel logs for Dynamics NAV in the Applications and Services Logs.
For more general information about ETW and event channels, see Event Tracing for Windows and Event Logs
and Channels in Windows Event Log.

Monitoring Microsoft Dynamics NAV Server Event Traces


Event tracing provides detailed information about what is occurring on the Microsoft Dynamics NAV Server and
application when users work with Dynamics NAV. This can help you identify and analyze problems or conditions
that affect performance. Event tracing enables you to dynamically monitor Microsoft Dynamics NAV Server
without having to restart the server or Dynamics NAV clients. By using industry-standard tools for event tracing,
you can start and stop event tracing sessions, and then view the trace event data from a stored log file.
You can use event tracing to track the following operations on Microsoft Dynamics NAV Server instances:
Running Dynamics NAV reports, queries, and XMLports.
Execution of SQL statements by Microsoft Dynamics NAV Server.
Execution of C/AL functions.
Telemetry.
Windows event log events.

Event Trace Monitoring Tools


There are various industry-standard tools that you can use to collect event trace data. The procedures in this
section use Windows Performance Monitor, PerfView, Event Viewer, and Windows PowerShell to illustrate how
you can collect and view event trace data. For details about how to use these tools and others, refer to the
documentation available with the tool. For an overview of some of the tools, see Tools for Monitoring
Performance Counters and Events.

Get Started
TASK FOR MORE INFORMATION, SEE

Review the list of trace events that are available for Microsoft Dynamics NAV Server Trace Events List
monitoring Microsoft Dynamics NAV Server instances.

Collect event trace data in an event trace log (.etl) file. Use How to: Use Performance Monitor to Collect Event Trace Data
the event trace monitoring tool to start an event trace
session. How to: Use PerfView to Collect Event Trace Data

How to: Use Logman to Collect Event Trace Data

View event trace data that is contained in an .etl file. How to: Use PerfView to View Event Trace Data

Use Event Viewer to collect and view events Monitoring Dynamics NAV Server Events by Using Event
Viewer

Use Windows PowerShell to view event trace data Monitoring Dynamics NAV Server Events by Using Windows
PowerShell

Turn off or limit the amount of telemetry trace events Turn Off or Limit Telemetry Trace Events
emitted based on the severity level.

See Also
Dynamics NAV Server Trace Events
Dynamics NAV Server Admin and Operational Events
Microsoft Dynamics NAV Server Trace Events
3/7/2018 • 8 min to read • Edit Online

This article provides an overview of the trace events that are generated by Dynamics NAV server instance.

Overview
There are two event trace providers that publish different trace events to the event log: Microsoft-
DynamicsNAV -Server and Microsoft-DynamicsNAV -Common. The Microsoft-DynamicsNAV -
Common provider is strictly for telemetry trace events. All other events use Microsoft-DynamicsNAV -
Server. You typically need to specify the event trace provider in the monitoring tool that you are using.
There are several types of trace events for each event trace provider, including: Windows event viewer, SQL
traces, service calls, C/AL function calls, and telemetry. Trace event types are identified by a keyword with a
corresponding decimal and hexadecimal value. The keywords and values enable you to collect data on
specific trace events. Some tools support the hexadecimal values only and other tools support both
hexadecimal and decimal.
For some trace events, there is separate event for when an operation starts and when it stops. This enables
you to determine the duration of the operation. Some monitoring tools, such as PerfView, will automatically
return the duration in the stop event.
Some monitoring tools might interpret and display the collected event trace differently than others. For
more information, see Event Trace Data.

Windows Event Viewer Trace Events


Windows Event Viewer trace events track errors, warnings, and information messages that provide information
about the condition or state of Microsoft Dynamics NAV Server instances. These events can be viewed in the
DynamicsNAV channel logs and Application log of Event Viewer on the computer that is running Microsoft
Dynamics NAV Server. For more information, see Monitoring Dynamics NAV Server Events Using Event Viewer.

EVENT TRACE PROVIDER KEYWORD DECIMAL VALUE HEXADECIMAL VALUE

Microsoft-DynamicsNAV- EventViewer 1 0x1


Server

For a list and description of EventViewer trace events, see Microsoft Dynamics NAV Server Admin and
Operational Events.

SQL Trace Events


SQL trace events track a specific set of SQL statements that are executed from the Microsoft Dynamics NAV
Server instance against the Dynamics NAV database on SQL Server.

EVENT TRACE PROVIDER KEYWORD DECIMAL VALUE HEXADECIMAL VALUE

Microsoft-DynamicsNAV- SQLTracing 2 0x2


Server

The event data that is collected includes: session ID, tenant ID, the Dynamics NAV user, and the SQL statement.
For more information, see Event Trace Data.
The following table lists the SQL trace events.

ID EVENT (TASK/OPCODE) WHAT IS TRACED

1 ExecuteScalar/Start SQL statements that query a database


table and return a single field from a
row in the query result.

2 ExecuteScalar/Stop SQL statements that query a database


table and return a single field from a
row in the query result.

3 ExecuteNonQuery/Start SQL statements that return a number


of rows from a database table

4 ExecuteNonQuery/Stop SQL statements that return a number


of rows from a database table

5 ExecuteReader/Start SQL statements that return a set of


rows from a database table.

6 ExecuteReader/Stop SQL statements that return a set of


rows from a database table.

7 ReadNextResult/Start SQL statements that return the next


result from a database query.

8 ReadNextResult/Stop SQL statements that return the next


result from a database query.

9 ReadNextRow/Start SQL statements that return the next


row in database table.

10 ReadNextRow/Stop SQL statements that return the next


row in database table.

11 BeginTransaction/Start SQL statements that start a database


transaction.

12 BeginTransaction/Stop SQL statements that start a database


transaction.

13 Prepare/Start SQL statements that create a prepared


version of the command on an instance
of SQL Server.

14 Prepare/Stop SQL statements that create a prepared


version of the command on an instance
of SQL Server.

15 OpenConnection/Start SQL statements that open connection


to the database from the connection
pool.
ID EVENT (TASK/OPCODE) WHAT IS TRACED

16 OpenConnection/Stop SQL statements that open connection


to the database from the connection
pool.

17 Commit/Start SQL statements that commit a


database transaction.

18 Commit/Stop SQL statements that commit a


database transaction.

19 Rollback/Start SQL statements that cancel the


changes in a pending database
transaction.

20 Rollback/Stop SQL statements that cancel the


changes in a pending database
transaction.

Service Call Trace Events


Service call trace events track when Dynamics NAV clients run the Dynamics NAV objects: Queries, Reports, and
XMLports.

EVENT TRACE PROVIDER KEYWORD DECIMAL VALUE HEXADECIMAL VALUE

Microsoft-DynamicsNAV- ServiceCall 4 0x4


Server

The event data that is collected includes: session ID, tenant ID, Dynamics NAV user, and the Dynamics NAV object
ID. For more information, see Event Trace Data.
The following table lists the service call trace events.

ID EVENT (TASK/OPCODE) WHAT IS TRACED

300 RunQuery/Start Dynamics NAV Query objects that are


opened and closed.

301 RunQuery/Stop Dynamics NAV Query objects that are


opened and closed.

302 RunReport/Start Dynamics NAV Report objects that are


opened and closed.

303 RunReport/Stop Dynamics NAV Report objects that are


opened and closed.

310 RunXmlPort/Start Dynamics NAV XMLport objects that


are opened and closed.

311 RunXmlPort/Stop Dynamics NAV XMLport objects that


are opened and closed.
ID EVENT (TASK/OPCODE) WHAT IS TRACED

500 OpenSession Microsoft Dynamics NAV Windows


clients and Microsoft Dynamics NAV
Web clients establish a connection to
the Microsoft Dynamics NAV Server
instance.

501 CloseSession Microsoft Dynamics NAV Windows


clients and Microsoft Dynamics NAV
Web clients establish a connection to
the Microsoft Dynamics NAV Server
instance.

C/AL Function Trace Events


C/AL function tracing events track the execution of C/AL functions and statements on the Microsoft Dynamics
NAV Server instance.

EVENT TRACE PROVIDER KEYWORD DECIMAL VALUE HEXADECIMAL VALUE

Microsoft-DynamicsNAV- ALTracing 8 0x8


Server

The event data that is collected includes: session ID, tenant ID, Dynamics NAV user, C/ALC/AL function, C/AL
statements, and line number. For more information, see Event Trace Data.

IMPORTANT
If the Microsoft Dynamics NAV Server instance is not configured for full C/AL function tracing, then only root-level C/AL
function will be traced. Statements and C/AL functions that are called from functions will not be traced. By default, the
Microsoft Dynamics NAV Server instance is not configured for full C/AL functionf tracing. For information about how to
specify full C/AL function tracing, see Configuring Microsoft Dynamics NAV Server.

The following table lists the C/AL function tracing events.

ID EVENT (TASK/OPCODE) WHAT IS TRACED

400 ExecuteALFunction/Start C/AL functions that are called.

402 ExecuteALFunctionFailed Errors that occur when executing C/AL


functions. The errors can be caused by
exceptions or ERROR Function (Dialog)
calls.

403 ExecuteALFunction C/AL statements that are executed.

Important: This trace event is only


traced when the Microsoft Dynamics
NAV Server is configured to full C/AL
function tracing.

Telemetry Trace Events


Telemetry trace events can provide data about operations in the application and how it is being used in
production. These events include both system telemetry trace events and user-defined, custom telemetry trace
events.

EVENT TRACE PROVIDER KEYWORD DECIMAL VALUE HEXADECIMAL VALUE

Microsoft-DynamicsNAV- TelemetryTracing 32 0x20


Common

Custom telemetry trace events are emitted from the application. These are events that are sent by
SENDTRACETAG function calls from inside the application. For more information about custom telemetry trace
events, see Instrumenting an Application for Telemetry.
Some of the important event data that is collected for both system and custom telemetry trace events includes:
tag, category, message, dataclassification. For more information about this data, see Event Trace Data.
Telemetry events can have one of the following event IDs, based on the data classification and verbosity (severity
level):

DATA CLASSIFICATION VERBOSITY ID

All except CustomerContent and Critical 700


EndUserIdentifiableInformation

Error 701

Informational 702

Informational 703

Verbose 704

Warning 705

Informational 706

CustomerContent or Critical 707


EndUserIdentifiableInformation

Error 708

Informational 709

Informational 710

Verbose 711

Warning 712

NOTE
Event IDs 703, 706, and 710 are used only for system telemetry trace events. All other IDs are used for both system and
custom events.
Event Trace Data
The following table lists the arguments that make up the data collected for trace events. When viewing event trace
data, the way that the arguments are interpreted and displayed can vary depending on the tool that you use.

ARGUMENT DESCRIPTION TRACE EVENT TYPE

category Specifies the category of the telemetry Telemetry (TelemetryData)


trace event.

connectionType Specifies the RoleTailored client that has Service calls (ServiceCall)
established the connection to the
Dynamics NAV server instance. Values
include Microsoft Dynamics NAV
Windows client and Microsoft Dynamics
NAV Web client.

dataclassification Specifies the client that has established Service calls (ServiceCall)
the connection to the Dynamics NAV
server instance. Values include
Microsoft Dynamics NAV Windows
client and Microsoft Dynamics NAV
Web client.

failureMessage Includes the error message that is C/AL function trace events (ALTracing)
returned when a C/AL function fails.

functionName Specifies the C/AL function that was C/AL function trace events (ALTracing)
executed.

lineNumber Specifies the line number of the C/AL function trace events
statement in the C/AL code of the
Dynamics NAV object that was
executed.

message Specifies the error, warning, or Windows event log trace events
information message text that was (EventViewer)
issued for a trace event
Telemetry (TelemetryData)

objectId Specifies the ID of the Dynamics NAV Service calls trace events (ServiceCall)
object that was executed in the session.
C/AL function trace events (ALTracing)

objectType Specifies the Dynamics NAV object type C/AL function trace events (ALTracing)
that executed by a C/AL function or
statement. Values include the following:
CodeUnit, Page, Query, Report, Table,
and XMLport.

sessionId Specifies the ID that is assigned to the All


session that is used by the operation.
Each operation establishes a session
with the Microsoft Dynamics NAV
Server instance from a connection in
the Microsoft Dynamics NAV Server's
connection pool.
ARGUMENT DESCRIPTION TRACE EVENT TYPE

sqlStatement Specifies the SQL statement that was SQL trace events (SQLTracing)
executed on the session.

statement Specifies the C/AL statement that was C/AL function trace events
executed on the session.

tenantId Specifies the ID of the tenant database All


that is mounted on the Microsoft
Dynamics NAV Server instance. If the
Microsoft Dynamics NAV Server
instance is not configured for
multitenancy, then the value is empty.
For more information about
multinenancy, see Multitenant
Deployment Architecture.

userName Specifies the Dynamics NAV user All


account that is logged on to the
session.

See Also
Monitoring Microsoft Dynamics NAV Server Events
Classifying Data
Microsoft Dynamics NAV Server Admin and
Operational Events (EventViewer) List
1/29/2018 • 10 min to read • Edit Online

Events have the source MicrosoftDynamicsNAVServer$[ServerInstance]. Each event has a unique ID and is
assigned to a task category. The source, IDs, and task categories enable you to filter the events that display in
Event Viewer. For a description of the task categories, see Task Categories.
The following table lists the events that are generated by the Microsoft Dynamics NAV Server.

EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

112 Error 12 Operational Message:


Fatal Sql error. The
connection can no
longer be used.

Remarks:
An error occurred on
the connection from
the Microsoft
Dynamics NAV Server
instance to the SQL
database and the
connection could not
been established.

This error could be


caused by one of the
following reasons:

- The Microsoft
Dynamics NAV Server
has been stopped.
- The SQL server
connection settings
are incorrect
- A network failure
has occurred.
- A hardware failure
has occurred on the
server or on your
computer.

To resolve this issue,


try to restart the
Microsoft Dynamics
NAV Server or see
Troubleshooting: A
fatal error occurred.
The connection to
SQL server cannot be
established.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

113 Information 12 Operational Message:


Object Change
Listener is listening on
SQL Server '{0}'in
Database'{1}'.

Remarks:
Occurs when the
Microsoft Dynamics
NAV Server instance
has established a
connection to the
SQL database. The
Change Listener
object listens for
changes to
application objects in
the Dynamics NAV
database.

201 Information 12 Operational Remarks:


This event ID is used
for various
information messages
that occur on
Microsoft Dynamics
NAV Server instances.

These events are


typical conditions and
are for information
only.

202 Warning 12 Admin Remarks:


This event ID is used
for various warning
messages that occur
on Microsoft
Dynamics NAV Server
instances.

These events indicate


that an unexpected
condition occurred on
the Microsoft
Dynamics NAV Server
instance. In most
cases, the Microsoft
Dynamics NAV Server
instance will still be
operational.

View the details of


each message to
determine the cause
of the problem.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

205 Information 8 Operational Message:


'Microsoft Dynamics
NAV Data Service' is
listening to requests
at net.tcp://[Server]:
[Port]/[ServerInstance]
/OData

Remarks:
Indicates that the
listening port for
OData web services
has been opened on
the Microsoft
Dynamics NAV Server
instance and it is
ready to handle
OData requests.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts.

206 Information 11 Operational Message:


'Microsoft Dynamics
NAV Data Service' at
net.tcp://[Server]:
[Port]/[ServerInstance]
/OData has stopped.

Remarks:
Indicates that the
listening port for
OData web services
on the Microsoft
Dynamics NAV Server
instance has been
closed.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance is stopped.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

207 Information 8 Operational Message:


'Microsoft Dynamics
NAV Business Web
Services' is listening
to requests at
net.tcp://[Server]:
[Port]/[ServerInstance]
/WS/Service

Remarks:
Indicates that the
listening port for
SOAP web services
has been opened on
the Microsoft
Dynamics NAV Server
instance and it is
ready to handle SOAP
requests.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts.

208 Information 11 Operational Message:


'Microsoft Dynamics
NAV Business Web
Services' at
net.tcp://[Server]:
[Port]/[ServerInstance]
/WS/Services has
stopped.

Remarks:
Indicates that the
listening port for
SOAP web services
has been closed.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance is stopped.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

209 Information 8 Operational Message:


'Microsoft Dynamics
NAV Service' is
listening to requests
at net.tcp://[Server]:
[Port]/[ServerInstance]
/Service

Remarks:
Indicates that the
listening port for
Microsoft Dynamics
NAV Windows client
has opened and it is
ready for Microsoft
Dynamics NAV
Windows client
connections.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts.

210 Information 11 Operational Message:


'Microsoft Dynamics
NAV Service' at
net.tcp://[Server]:
[Port]/[ServerInstance]
/Service has stopped.

Remarks:
The listening port for
Microsoft Dynamics
NAV Windows client
has closed.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance is stopped.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

214 Information 8 Operational Message:


'Microsoft Dynamics
NAV Service' is
listening to requests
at net.tcp://[Server]:
[Port]/[ServerInstance]
/ManagementService.

Remarks:
Indicates that the
listening port for
Microsoft Dynamics
NAV Server
Administration tool
has been opened on
the Microsoft
Dynamics NAV Server
instance.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts.

215 Information 11 Operational Message:


'Microsoft Dynamics
NAV Service' at
net.tcp://[Server]:
[Port]/[ServerInstance]
/ManagementService
has stopped.

Remarks:
Indicates that the
listening port for the
Microsoft Dynamics
NAV Server
Administration tool
has closed.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance is stopped.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

216 Error 13 Admin Remarks:


This event ID is used
for various errors that
occur when the
Microsoft Dynamics
NAV Server cannot
start or establish a
connection to the
Dynamics NAV
database on SQL
Server.

These events are


caused by unhandled
exceptions that are
thrown the Microsoft
Dynamics NAV Server
instances and indicate
that an unrecoverable
condition has
occurred.

The errors can be


caused by an
incorrect
configuration of the
Microsoft Dynamics
NAV Server or the
Microsoft SQL Server
connection.

To resolve errors,
verify the Microsoft
Dynamics NAV Server
and SQL Server
configuration. For
more information, see
Configuring Microsoft
Dynamics NAV Server
and Configuring
Microsoft SQL Server.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

217 Information 13 Operational Remarks:


This event ID is used
for various
information messages
that occur when the
Microsoft Dynamics
NAV Server starts and
establishes a
connection to the
Dynamics NAV
database on SQL
Server.

These events are


caused by exceptions
that are thrown by
the Microsoft
Dynamics NAV Server
instances. These
events are typical
conditions and are for
information only.

218 Warning 13 Admin Remarks:


This event ID is used
for various warnings
that occur when the
Microsoft Dynamics
NAV Server starts and
establishes a
connection to the
Dynamics NAV
database on SQL
Server.

These events are


caused by handled
exceptions that are
thrown by the
Microsoft Dynamics
NAV Server instances.

Typically, the
Microsoft Dynamics
NAV Server will
continue to operate,
but you should
address the problem
that is described in
the event message.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

219 Information 12 Operational Message:


Microsoft Dynamics
NAV Application
Server for tenant
'[TenantID]' is
scheduled to start
with the following
configuration:
Company:
[CompanyName],
Codeunit:
[StartupCodeunitID],
Method:
[StartupMethod],
Arguments:
[StartupArguments]

Remarks:
Refers to NAS service
only. Indicates that
the NAS service is
scheduled to start.

220 Information 12 Operational Message:


Microsoft Dynamics
NAV Application
Server for tenant
'[TenantID]' has
completed.

Remarks:
Refers to NAS service
only. Indicates that
the NAS service has
started successfully.

221 Error 12 Admin Message:


The Microsoft
Dynamics NAV
Application Server
session for tenant
'[TenantID]' has failed
and will be restarted.
Reason: [Message]

Remarks:
Refers to NAS service
only. Indicates that an
exception has
occurred and NAS
service did not start.
NAS service will
attempt to start
again.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

222 Error 12 Admin Message:


The Microsoft
Dynamics NAV
Application Server
session for tenant
'[TenantID]' has
permanently failed
and will not be
restarted. Reason:
[Message]

Remarks:
Refers to NAS service
only. Indicates that an
exception has
occurred and NAS
service did not start.
The NAS service will
not be restarted
because the
maximum number of
times that service can
attempt to restart has
been met. This value
is specified by the
NASServicesRetryAtte
mptsPerDay in the
CustomSetting.xml file
for the Microsoft
Dynamics NAV Server
instance. For more
information, see
Configuring NAS
Services.

223 Information 12 Operational Message:


The service is
initializing its
configuration.

Remarks:
Occurs when the
Microsoft Dynamics
NAV Server instance
has been started but
is not ready for use.

The Microsoft
Dynamics NAV Server
instance is loading the
configuration settings
that are specified in
the
CustomSettings.xml
file. For more
information about the
CustomSettings.xml
file, see Configuring
Microsoft Dynamics
NAV Server.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

224 Information 12 Operational Message:


The service has
completed
configuration and is
ready.

Remarks:
Occurs when the
Microsoft Dynamics
NAV Server is started
and is ready for use.

226 Information 12 Operational Message:


The NAV application
was mounted from
database
'[DatabaseName]' on
database server
'[SQLServerInstance]'.

Remarks:
Refers to Microsoft
Dynamics NAV Server
instances that are
used in a multitenant
environment.

Indicates that the


Microsoft Dynamics
NAV Server instance
is connected to the
Dynamics NAV
application in the
specified application
database.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts or the
Mount-
NAVApplication
cmdlet is run.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

227 Error 12 Admin Message:


The NAV application
could not be
mounted for database
'[DatabaseName]' on
database server
'[SQLServerInstance]'
due to the following
error: [Message].

Remarks:
Refers to Microsoft
Dynamics NAV Server
instances that are
configured for
multitenancy.

Indicates that the


Microsoft Dynamics
NAV Server instance
cannot connect the
Dynamics NAV
application in the
specified application
database.

Verify that Microsoft


Dynamics NAV Server
is configured to use
the correct application
database. For more
information, see
Migrating to
Multitenancy.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

228 Information 12 Operational Message:


Tenant '[Tenant]' was
mounted from
database
'[DatabaseName]' on
database server
'[SQLServerInstance]'.

Remarks:
Refers to the
Microsoft Dynamics
NAV Server instances
that are configured
for multitenancy.

Indicates that the


Microsoft Dynamics
NAV Server is
connected to the
tenant that is in the
specified tenant
database.

Typically, this
condition occurs
when the Microsoft
Dynamics NAV Server
instance starts or
when the Mount-
NAVTenantcmdlet is
run.

229 Error 12 Admin Message:


Tenant '[TenantID]'
could not be
mounted due to the
following error:
[Message]

Remarks:
Refers to Microsoft
Dynamics NAV Server
instances that are
configured for
multitenancy.

Occurs when the


Microsoft Dynamics
NAV Server instance
cannot connect to the
tenant database.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

230 Information 12 Operational Message:


Tenant '[Tenant]' was
dismounted.

Remarks:
Refers only to
Microsoft Dynamics
NAV Server instances
that are used in a
multitenant
environment.

Typically, this
condition occurs
when the [Dismount-
NAVTenant cmdlet is
run.

231 Error 12 Admin Remarks:


This event ID is used
for various errors that
occur when
authenticating a
Dynamics NAV user
who is trying to log
on to the Microsoft
Dynamics NAV Server
from a RoleTailored
client.

This event is caused


by an error in the
authentication
system.

This event is only


relevant when the
Microsoft Dynamics
NAV Server instance
is configured for
NavUserPassword or
AccessControlService
credential types.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

232 Information 12 Operational Message:


A user successfully
authenticated against
the server.

Remarks:
This event occurs
when a user
successfully logs on to
the Microsoft
Dynamics NAV Server
instance from a
RoleTailored client.

This event is only


relevant when the
Microsoft Dynamics
NAV Server instance
is configured for
NavUserPassword or
AccessControlService
credential types.

232 Information 12 Operational Message:


A user provided
invalid credentials.
Authentication was
not successful.

Remarks:
This event occurs
when a user provides
an invalid user name
or password when the
user logs on to the
Microsoft Dynamics
NAV Server instance
from a RoleTailored
client.

This event is only


relevant when the
Microsoft Dynamics
NAV Server instance
is configured for
NavUserPassword or
AccessControlService
credential types.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

233 Information 12 Admin Message:


The session
attempted to write to
table '[Table Name]',
but the write
operation was
rejected because it
exceeds the optional
table limit of the
license. The license
only permits writing
to [Number] optional
tables per session.
The session has
already written to the
following tables:
'[Table Name]', '[Table
Name]', 'and [Table
Name]'.

Remarks:
This event pertains to
the limited user
license that is used on
the Dynamics NAV
solution. A limited
user license specifies
how many optional
tables a session can
write to. For more
information about
licensing for Dynamics
NAV, see Microsoft
Dynamics ERP
Licensing Guide.

700-706 Critical, Error, 33 Admin Telemetry events. You


Warning, Information can configure the
lowest level of
telemetry events to
be recorded in the
event log by changing
the Diagnostic Trace
Level setting in the
the Microsoft
Dynamics NAV Server
instance
configuration. For
more information, see
Configuring Microsoft
Dynamics NAV Server.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

1000 Error 12 Operational Certificate monitoring


has permanently
failed and will not be
restarted. Reason:
[Message]

Remarks:
An unhandled
exception occurred
that prevents the
certificate from being
monitored. Note:
Event IDs 1000
through 1006 refer to
the security certificate
that is used by the
Microsoft Dynamics
NAV Server instance
to protect
communications with
client or web services.
For more information,
see Walkthrough:
Implementing
Security Certificates in
a Test Environment
and How to:
Implement Security
Certificates in a
Production
Environment.

1001 Information 12 Operational Message:


Configuration setting
'ClientServicesCertifica
teThumbprint' has
been updated. It will
not take effect until
the service is
restarted.

Remarks:
Occurs when the
security certificate
that is used by
Microsoft Dynamics
NAV Server has been
replaced. The
thumbprint is set by
the
ClientServicesCertific
ateThumbprint
parameter in the
CustomSetting.xml file
for the Microsoft
Dynamics NAV Server.
EVENT ID LEVEL TASK CATEGORY CHANNEL MESSAGE/REMARKS

1002 Error 12 Operational Message:


The service certificate
is valid from [Date] to
[Date] only.

Remarks:
Occurs when the
security certificate
that is used by the
Microsoft Dynamics
NAV Server is not
valid for use on the
current date.

1003 Warning 12 Operational Message:


The service certificate
is close to its
expiration date.

Remarks:
Occurs for the first
time 30 days before
the expiration date of
the security certificate
that is used on the
Microsoft Dynamics
NAV Server, and then
one time each day
until the certificate is
replaced or renewed.

1006 Information 12 Operational Message:


Configuration setting
'ClientServicesCertifica
teThumbprint' has
been updated. It will
not take effect until
the service is
restarted.

Remarks:
Occurs when a new
security certificate is
applied on Microsoft
Dynamics NAV Server.
The thumbprint is set
by the
ClientServicesCertific
ateThumbprint
parameter in the
CustomSetting.xml file
for the Microsoft
Dynamics NAV Server.

Task Categories
Task categories logically classify events according to the operations that they perform. In Event Viewer, you can
sort, include, or exclude events in the Windows Application log based on the task categories. A task category is
defined by a decimal number. The following table lists the task categories that are associated with Microsoft
Dynamics NAV Server events.

TASK CATEGORY DESCRIPTION

8 Service connects to the Microsoft Dynamics NAV Server


instance.

11 Service disconnects from the Microsoft Dynamics NAV Server


instance.

12 Information, warning, or error message from the Microsoft


Dynamics NAV Server instance.

13 Exception thrown by Microsoft Dynamics NAV Server.

See Also
Monitoring Dynamics NAV Server Events Using Event Viewer
Monitoring Microsoft Dynamics NAV Server Events
Monitoring Dynamics NAV Server Events Using
Event Viewer
3/7/2018 • 5 min to read • Edit Online

Events that occur on the Microsoft Dynamics NAV Server instances can be recorded in event logs on the
computer that is running Microsoft Dynamics NAV Server. You can view the events by using Event Viewer.

About Dynamics NAV Server Events in Event Viewer


Events that occur on Microsoft Dynamics NAV Server instances are recorded in the event channels specific to
Dynamics NAV and also in the general Windows Application log. Event channels provide a way to collect and
view events from a specific event trace provider. This differs from the Windows Application log which contains
system-wide events from multiple publishers (applications and components).

Dynamics NAV channel logs


In the Event Viewer console tree, open Applications and Services Logs > Microsoft > DynamicsNAV.
Server folder
The Server folder contains events from the event trace provider called Microsoft-DynamicsNAV -Server. The
events are recorded in the following logs:

LOG DESCRIPTION

Admin Includes events that target end users and IT administrators.


These events typically indicate a problem that requires action
to resolve the problem. An example of an admin event is a
tenant database failing to mount on the Microsoft Dynamics
NAV Server instance.

For a list and description of these events, see Dynamics NAV


Server Admin and Operational Events.

Operational Includes events that provide information about an operation


that occurred on Microsoft Dynamics NAV Server instances.
These events are typically ordinary operating events that do
not require any action but can be used to analyze and
diagnose a problem. An example of an operational event is
the shutting down of the Microsoft Dynamics NAV Server
instance.

For a list and description of these events, see Dynamics NAV


Server Admin and Operational Events.
LOG DESCRIPTION

Debug Includes the trace event types: SQL (SQLTracing), service calls
(ServiceCalls), and C/AL function calls (ALTracing). For more
information about the different trace events and others ways
to monitor them, see Microsoft Dynamics NAV Server Trace
Events and Monitoring Microsoft Dynamics NAV Server
Events.

Note: In Event Viewer, this log is hidden and disabled by


default. For information about how to show and enable this
log, see How to: Enable Dynamics NAV Debug Logs in Event
Viewer.

Common folder
The Common folder contains telemetry events from the event trace provider called Microsoft-DynamicsNAV -
Common. This folder contains strictly telemetry events, which have IDs 700-707. The telemetry events are
recorded in the following logs:

LOG DESCRIPTION

Admin Includes custom telemetry trace events that are emitted from
the application. These are events that are sent by
SENDTRACETAG function calls from inside the application.

For more information, see Instrumenting an Application for


Telemetry.

Note The Microsoft Dynamics NAV Server instance includes a


configuration setting called Diagnostic Trace Level (
TraceLevel in the customsettings.config file) that enables
you to specify the lowest severity level of telemetry events to
be recorded in the event log, or even turn off telemetry event
logging altogether. If you do not see the expected events,
then verify the Microsoft Dynamics NAV Server instance
configuration with an administrator. For information, see
Configuring Microsoft Dynamics NAV Server.

Operational Not applicable.

Debug Includes system telemetry trace events that occur.

Note: In Event Viewer, this log is hidden and disabled by


default. For information about how to show and enable this
log, see How to: Enable Dynamics NAV Debug Logs in Event
Viewer.

Application log
The Application log includes admin and operational type events (errors, warnings, and information messages) that
occur on the Microsoft Dynamics NAV Server instance.
To view the Application log, in the console tree, choose Windows Logs, Applications.
The events in this log are the same events that are recorded in the Admin and Operation logs in the
DynamicsNAV > Server channel. Therefore, you can consider the Application log to be a secondary log for
these events. Unless you are using System Center Operations Manager to monitor Microsoft Dynamics NAV
Server events, you can disable logging Microsoft Dynamics NAV Server events to the Windows Application log
and rely on Applications and Services Logs instead. For more information, see How to: Disable Logging Events
to the Windows Application Log.

NOTE
Trace events are not included in this log.

Filtering Dynamics Server Events in Event Viewer


By default, the Microsoft Dynamics NAV Server logs contain events of all levels (error, warning, and information)
for all Microsoft Dynamics NAV Server instances. You can use the filtering functionality that is available in Event
Viewer to display only Microsoft Dynamics NAV Server instance events that meet specific criteria. For example, if
you have several Microsoft Dynamics NAV Server instances, you can filter logs to show only events from a
specific Microsoft Dynamics NAV Server instance. For more information, see the following example.
Example
Your Microsoft Dynamics NAV Server is running several instances that are configured with multiple tenants. In
Event Viewer, you want to view only errors that occurred in the last 24 hours on the tenant MyTenant1 of the
Microsoft Dynamics NAV Server instance MyNavServerInstance1.
To filter the event log
1. For example, in the console tree of Event Viewer, choose Applications and Services Logs > Microsoft >
DynamicsNAV > Server.
2. Select the Admin log.
3. In the Action pane, choose Filter Current Log.
The Filter Current Log window opens.
4. On the Filter tab, set the Logged drop-down list to Last 24 hours.
5. In the Error Level section, select the Error check box.
6. Choose the XML tab.
XML similar to the following is displayed:

<QueryList>
<Query Id="0" Path="Microsoft-DynamicsNAV-Server/Admin">
<Select Path="Microsoft-DynamicsNAV-Server/Admin">
*[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 604800000]]]
</Query>
</QueryList>

Microsoft-DynamicsNAV-Server indicates that Microsoft Dynamics NAV Server is the provider of the events
in the log.
7. Select the Edit query manually check box, and then choose the Yes button.
8. In the <Select Path="Microsoft-DynamicsNAV-Server/Admin"> element, after
*[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 86400000]]] , add the following lines:
and
*[EventData[Data[@Name='tenantId'] and Data = 'MyTenant1']]
and
*[EventData[Data[@Name='serverInstanceName'] and Data='MyNavServerInstance1']]

The complete XML should look similar to the following XML:

<QueryList>
<Query Id="0" Path="Microsoft-DynamicsNAV-Server/Admin">
<Select Path="Microsoft-DynamicsNAV-Server/Admin">
*[System[(Level=2) and TimeCreated[timediff(@SystemTime) <= 604800000]]]
and
*[EventData[Data[@Name='tenantId'] and Data = 'MyTenant1']]
and
*[EventData[Data[@Name='serverInstanceName'] and Data='MyNavServerInstance1']]
</Select>
</Query>
</QueryList>

9. Choose the OK button.


The Admin log displays only errors that occurred in the last 24 hours on tenant Tenant1 and Microsoft
Dynamics NAV Server instance MyNavServerInstance1. The applied filter can be removed. Alternatively,
you can save it as a custom view. For more information about filtering in Event Viewer, see Filter Displayed
Events and Advanced XML filtering in the Windows Event Viewer.

See Also
Monitoring Microsoft Dynamics NAV Server Events
Microsoft Dynamics NAV Server Trace Events
Monitoring Microsoft Dynamics NAV Server
Monitoring Microsoft Dynamics NAV Server Using Performance Counters
Windows Event Viewer
How to: Use Performance Monitor to Collect Event
Trace Data
3/7/2018 • 3 min to read • Edit Online

This topic describes how to use Windows Performance Monitor to collect event trace data for Microsoft Dynamics
NAV Server. To collect trace event data, you create a Data Collector Set, and then start the Data Collector Set.
To create a Data Collector Set for collecting Dynamics NAV trace event data
1. Start Windows Performance Monitor.
Choose Start, in the Search box, type perfmon, and then choose the related link.
2. In the navigation tree, expand Data Collector Sets, right-click User-defined, choose New, and then
choose Data Collector Set.
3. On the Create new Data Collector Set Wizard page, enter a name for the new data collector set, select
Create manually (Advanced), and then choose the Next button.
4. On the What type of data do you want to include page, select the Event trace data check box, and then
choose the Next button.
5. On the Which event trace providers would you like to enable page, choose the Add button to add a
provider.
6. In the Event Trace Providers list, select Microsoft-DynamicsNav-Server, and then choose the OK
button.
7. If you want to collect data for all trace events, choose the Next button. If you want to collect data on specific
trace events, do the following:
a. In the Properties list, select Keywords (Any), and then choose the Edit button.
b. On the Property page, in the Manual box, type the keyword decimal value for the trace event. For a
list of keyword values for trace events, see Microsoft Dynamics NAV Server Trace Events.
For example, if you want to collect data on service call trace events, then type 4. If you want to collect
data on more than one trace event, add the keyword values for each trace event and then use the sum
in the Manual box. For example, if you want to collect data on service calls (keyword decimal value =
4) and C/AL functions (keyword decimal value = 8), then use the value 12.

NOTE
Performance Monitor will automatically convert the value to hexadecimal, such as 0x4 or 0xC. You can also
enter the keyword hexadecimal values directly.

c. Choose the OK button, and then Next button.


8. On the Where would you like the data to be stored page, set the Root directory box to the folder
where you want to save the event trace log file that is generated when you run the Data Collector Set.
9. Choose the Finish button to complete the wizard
The new Data Collector Set appears under User Defined in the navigation pane.
Complete the next procedure to increase trace buffer settings to make sure that events are not dropped
when collecting trace event data.
To change the Data Collector Set trace buffers
1. In the navigation pane, select the new Data Collector Set.
2. In the main pane, right-click the DataCollector01 item, and then choose Properties.
3. In the Properties dialog box, choose the Trace Buffers tab.
4. Set the following properties.

PROPERTY RECOMMENDED MINIMUM VALUES

Buffer size 128

Minimum buffers 50

Maximum buffers 50

You might have to adjust these properties based on the monitoring sessions and expected number of events
that will be collected. If a large number of events are collected, then the trace buffer size and count might
have to be increased.
5. Choose the OK button to save and close the Properties dialog box.

To start and stop a Data Collector Set


To start to collect data, right-click the Data Collector Set, and then choose Start.
To stop collecting data, right-click the Data Collector Set, and then choose Stop.
For information about how to schedule a time to start and stop collecting data, see Schedule Data Collection
in Windows Performance Monitor.
The collected event trace data is stored in an event trace log (.etl) file in the location that you specified. You
can view the data in the log file by using various industry-standard tools, such as PerfView. For information
about how to use PerfView to view the event trace data, see How to: Use PerfView to View Event Trace Data.

See Also
Monitoring Microsoft Dynamics NAV Server Events
How to: Use PerfView to View Event Trace Data
Instrumenting an Application for Telemetry]
How to: Use PerfView to Collect Event Trace Data
5/31/2018 • 2 min to read • Edit Online

This topic describes how to use PerfView to collect event trace data for Microsoft Dynamics NAV Server. When you
collect event trace data, the data is stored in an event trace log (.etl) file in a location that you choose.
To install PerfView
Go to http://go.microsoft.com/fwlink/?LinkID=313428, and then follow the instructions to download and install
PerfView.
To collect event trace data
1. Open PerfView.exe.
2. On the Collect menu, choose Collect.
The Collecting data over a user specified interval dialog box appears.
3. Set the Data file field to the path and name of the log file in which to store the trace event data. The file
name must have the .etl file name extension.
4. Choose Advanced options.
The upper part of the Advanced optionsarea includes check boxes and fields that specify the providers
from which to collect event trace data.
5. In the Additional providers field, type Microsoft-DynamicsNav-Server.
If you want to filter on a specific trace event, include a colon after Microsoft-DynamicsNav-Server,
followed by the hexadecimal keyword value for the trace event. For example, to collect trace events
data on service call trace events only, then type Microsoft-DynamicsNav-Server:0x4.
If you want to collect data on more than one trace event, add the keyword values for each trace event
and then use the sum in the field. For example, if you want to collect data on service calls (keyword
value = 0x4) and C/AL function traces (keyword value = 0x8), then type Microsoft-DynamicsNav-
Server:0xC in the field. In hexadecimal, the sum of 0x4 and 0x8 is 0xC.
6. Clear the check boxes above the Additional providers field for any providers that you do not want to
collect data for.
7. To start recording data, choose the Start Collection button.
8. To stop recording data, choose the Stop Collection button.
The collected event trace data is stored in an event trace log (.etl) file in the location that you specified. You
can view the data in the log file by using various industry-standard tools, such as PerfView. For information
about how to use PerfView to view the event trace data, see How to: Use PerfView to View Event Trace Data.

To view event trace data from an event trace log file


1. Open PerfView.exe.
2. In PerfView, use the left pane to locate the .etl file that you want to view.
The left pane displays the current directory and the files that PerfView is set up to browse. To change a
directory, choose a subdirectory from the list or type the directory (for example, c:\PerfLogs) in the text box
at the top of the pane.
3. Double-click the .etl file that you want to view.
Several items appear in the left pane under the .etl file that you selected.
4. To view the event traces, double-click Events.
The Events window opens to display the contents of the .etl file. Trace events are listed in the left pane.
5. To view details about a trace event, double-click the trace event.

See Also
Monitoring Microsoft Dynamics NAV Server Events
Microsoft Dynamics NAV Server Trace Events
Instrumenting an Application for Telemetry
Monitoring Long Running SQL Queries in the Event Log
How to: Use LogMan to Collect Event Trace Data
1/29/2018 • 1 min to read • Edit Online

This article describes how to use logman to collect event trace data for Microsoft Dynamics NAV Server. Logman
(logman.exe) comes with the Windows Operating System. You can use it to create and manage event trace session
and performance logs from the command prompt.
This article provides a brief introduction to using logman to collect trace event data for Microsoft Dynamics NAV
Server and telemetry events. For more detailed information about logman, see Logman.

Collect event trace data


You can collect Microsoft Dynamics NAV Server trace event data from two different trace event providers:
Microsoft-DynamicsNAV -Server and Microsoft-DynamicsNAV -Common. Microsoft-DynamicsNAV -
Server is used for trace events like SQL traces, C/AL function traces, and session calls. Microsoft-
DynamicsNAV -Common is used for telemetry events.
Data that is collected with logman is stored in a event trace log (.etl) file.
The following steps give you an example of how to use logman.
1. Open the command prompt, and change to the directory that contains the logman.exe file.
This is typically C:\Windows\System32

2. At the command prompt, run one of the following commands to create a trace data collector.
For telemetry trace events:

logman create trace MyTelemetryTraceData -p Microsoft-DynamicsNAV-Common -o


c:\perflogs\MyTelemetryTraceData.etl

For server trace events:

logman create trace MyServerTraceData -p Microsoft-DynamicsNAV-Server -o


c:\perflogs\MyServerTraceData.etl

These commands will create event log files named MyTelemetryTraceData.etl and MyServerTraceData.etl in
the c:\perflogs folder of your computer.
3. To start the trace session, run one of the following commands.
For telemetry trace events:

logman start MyTelemetryTraceData

For server trace events:

logman start MyServerTraceData

4. To stop the trace session, run one of the following commands.


For telemetry trace events:

logman stop MyTelemetryTraceData

For server trace events:

logman stop MyServerTraceData

The data is now stored in an .elt file.

View trace event data


There are various industry tools available for viewing data in .etl files.
For example, from the command line, you can use the tracerpt command to create dump files, summary, and
report files. The following code creates files for the MyTelemetryTraceData_000001.etl file:

tracerpt c:\perflogs\MyTelemetryTraceData_000001.etl -o c:\perflogs\MyTelemetry-dmp.xml -of XML -summary


c:\perflogs\MyTelemetry-summary.txt -report c:\perflogs\MyTelemetry-rpt.xml

You can also use PerView. For more information, see How to: Use PerfView to View Event Trace Data.

See Also
Monitoring Microsoft Dynamics NAV Server Events
Microsoft Dynamics NAV Server Trace Events
Instrumenting an Application for Telemetry
Monitoring Dynamics NAV Server Events with
PowerShell
1/29/2018 • 3 min to read • Edit Online

Events that occur on the Microsoft Dynamics NAV Server instances are recorded in event logs on the computer
that is running Microsoft Dynamics NAV Server. You can view the events by using Windows PowerShell as
described in this article.

PowerShell Get-WinEvent Cmdlet


You can use the Get-WinEvent cmdlet of Windows PowerShell to view Microsoft Dynamics NAV Server instance
events and trace events in the event logs and event tracing log files on the Microsoft Dynamics NAV Server
computer. The Get-WinEvent cmdlet retrieves the same events that can be viewed in Event Viewer under
Applications and Services Logs > Microsoft > DynamicsNAV (see Monitoring Dynamics NAV Server Events
Using Event Viewer).
The Get-WinEvent cmdlet includes several parameters that enable you to filter the events that you view and specify
how the events are displayed. Windows PowerShell enables you can create scripts that perform complex
operations for extracting and displaying specific event data. For more information about the Get-WinEvent cmdlet,
see Get-WinEvent.
For more information about installing and getting started with Windows PowerShell, see Getting Started with
Windows PowerShell.

To use the Get-WinEvent Cmdlet to view events


1. If you want to view events in a Debug log, ensure that the log is enabled. The Admin and Operational
logs are enabled by default.
For information, see To enable the Microsoft Dynamics NAV Server Debug Log from Windows PowerShell.
2. On the computer that is running Microsoft Dynamics NAV Server, start Window PowerShell.
For more information, see Starting Windows PowerShell.
3. At the command prompt, enter the Get-WinEvent command. The following table provides some simple
example commands.

TO VIEW COMMAND

Events in the all DynamicsNAV > Server logs Get-WinEvent -ProviderName Microsoft-DynamicsNav-
Server

Events in the all DynamicsNAV > Common logs Get-WinEvent -ProviderName Microsoft-DynamicsNav-
Common

Events in the DynamicsNAV > Server > Admin log Get-WinEvent -LogName Microsoft-DynamicsNav-
Server/Admin

Events in the DynamicsNAV > Common > Admin log Get-WinEvent -LogName Microsoft-DynamicsNav-
Common/Admin
TO VIEW COMMAND

Events in the Microsoft Dynamics NAV Server Operational Get-WinEvent -LogName Microsoft-DynamicsNav-
log Server/Operational

Trace events in the Microsoft Dynamics NAV Server Debug Get-WinEvent -LogName Microsoft-DynamicsNav-
log Server/Debug -Oldest

To enable the Dynamics NAV Debug Logs from Windows PowerShell


There are two debug logs for Dynamics NAV: Microsoft-DynamicsNav-Server/Debug and Microsoft-
DynamicsNav-Common/Debug.
1. On the computer that is running Microsoft Dynamics NAV Server, start Window PowerShell as an
administrator.
2. At the command prompt, run the following commands:

wevtutil.exe set-log "Microsoft-DynamicsNav-Server/<Debug>" /q:true /e:true

wevtutil.exe set-log "Microsoft-DynamicsNav-Common/<Debug>" /q:true /e:true

TIP
You can also enable the Debug log from Event Viewer. For more information, see Enable Analytic and Debug Logs.

Filtering Microsoft Dynamics NAV Server Events


You can filter the events that you view in a Microsoft Dynamics NAV Server log by setting the FilterXpath
parameter of the Get-WinEvent cmdlet. The following examples illustrate how you can use the FilterXpath
parameter to filter the Microsoft Dynamics NAV Server events.
Example 1
The following example uses the Get-WinEvent cmdlet to view errors in the Microsoft Dynamics NAV Server
Admin log for the tenant MyTenant1 on the server instance MyNavServerInstance1.

Get-WinEvent -LogName 'Microsoft-DynamicsNav-Server/Admin' -FilterXPath "*[System[(Level=2)]] and *


[EventData[Data[@Name='tenantId'] and (Data = 'MyTenant1')]] and *[EventData[Data[@Name='serverInstanceName']
and Data='MyNavServerInstance1']]" | Format-List -Property Message-

Example 2
The following is an example of a Windows PowerShell script that you can create and run to view trace events in the
Microsoft Dynamics NAV Server Debug log. The script returns the start and stop C/AL function trace events that
take more than four seconds to execute on the tenant MyTenant1 of the server instance MyNavServerInstance1.
$maxAllowedSeconds = 4

$xPath = "*[System[(EventID = 400 or EventID = 401)]] and " +


"*[EventData[Data[@Name='tenantId'] and (Data = 'MyTenant1')]] and " +
"*[EventData[Data[@Name='serverInstanceName'] and Data='MyNavServerInstance1']]"

$events = Get-WinEvent -LogName 'Microsoft-DynamicsNav-Server/Debug' -FilterXPath $xPath -Oldest -MaxEvents


10000

Write-Host "List of AL functions that took more than $maxAllowedSeconds seconds to execute :" -ForegroundColor
DarkYellow

for($i = 0; $i -lt $events.Length; $i+=2)


{
$seconds = ($events[$i + 1].TimeCreated - $events[$i].TimeCreated).Seconds

if ($seconds -ge $maxAllowedSeconds )


{
Write-Host $events[$i].Message `r`n -ForegroundColor Magenta
}
}

You can create the script by using, for example, Notepad or Windows PowerShell Integrated Scripting Environment
(ISE ). You save the script as .ps1 file type, and then run it from the Windows PowerShell.

See Also
Monitoring Microsoft Dynamics NAV Server Events
Microsoft Dynamics NAV Server Trace Events
Monitoring Microsoft Dynamics NAV Server
Monitoring Microsoft Dynamics NAV Server Using Performance Counters
Event Viewer
Turn Off or Limit Telemetry Trace Events
3/7/2018 • 2 min to read • Edit Online

The application and platform can emit many telemetry trace events, which can be collected using various event
trace tools. For example, telemetry trace events are recorded in the Microsoft Dynamics NAV Server channel logs,
which you can see in Event Viewer, under Applications and Services Logs > Microsoft > DynamicsNAV >
Common > Admin.
The number of events can place a large demand on the logging resources on the computer running the Microsoft
Dynamics NAV Server instance. To help eleviate this demand, the Microsoft Dynamics NAV Server instance
includes a configuration setting called Diagnostic Trace Level ( TraceLevel in the customsettings.config file) that
enables you to specify the lowest severity level of customer telemetry trace events that are emitted from the
application, or even turn off telemetry events altogether. Custom telemetry trace events have IDs from 700-712.
To configure the Diagnostic Trace Level setting, you can use the Microsoft Dynamics NAV Server Administration
tool, modify the Microsoft Dynamics NAV Server instance configuration file (CustomSettings.config) directly, or
use the Set-NAVServerConfiguration cmdlet of the Microsoft Dynamics NAV Administration Shell.

TIP
Custom telemetry events are generated by calls to the SENDTRACETAG method in code. For more information, see
Instrumenting an Application for Telemetry.

Use the Microsoft Dynamics NAV Server Administration tool


1. To start the Microsoft Dynamics NAV Server Administration tool, select Start, and in the Search programs
and files box, type Microsoft Dynamics NAV Administration, and then choose the related link.
2. In the left pane, under Console root, select the Microsoft Dynamics NAV Server instance.
3. In the center pane, select the Edit button.
4. Under General, set the Diagnostic Trace Level:
You use this setting to filter out lower-level events from being emitted. For example, if you set this setting to
Error, only Error and Critical events will be emitted.
Set to Off if you do not want to emit telemetry trace events.
5. Select the Save button, and then select the OK button.
You must restart the Microsoft Dynamics NAV Server instance for the changes to take effect.
6. To restart, the Microsoft Dynamics NAV Server instance, in the left pane, select the Microsoft Dynamics
NAV computer.
Unless you are administering a remote computer, this is Microsoft Dynamics NAV (local).
7. In the center pane, right-click an instance, and then select Restart.

Modify the CustomSettings.config file


1. Open the CustomSettings.config file for the Microsoft Dynamics NAV Server instance in a text editor, such
as Notepad.
By default, the file is located in the C:\Program Files\Microsoft Dynamics NAV\110\Service folder or
C:\Program Files\Microsoft Dynamics NAV\110\Service\Instances\<instancename> folder (for multitenant
installations).
2. Set the TraceLevel setting to Critical, Error, Warning, Normal (this corresponds to the Information
level), Verbose, or Off.
3. Save the file, and then restart the Microsoft Dynamics NAV Server instance.

Use the Microsoft Dynamics NAV Administration Shell


1. Start the Microsoft Dynamics NAV Administration Shell.
2. At the command prompt, run the following command:

Set-NAVServerConfiguration -ServerInstance DynamicsNAV -KeyName TraceLevel -KeyValue level -ApplyTo All

Substitute DynamicsNAV with the name of the Microsoft Dynamics NAV Server instance and level with
either Critical , Error , Warning , Normal , Verbose , or Off .

For more information about how to use the Microsoft Dynamics NAV Administration Shell, see Microsoft
Dynamics NAV Windows PowerShell Cmdlets and Set-NAVServerConfiguration Cmdlet.

See Also
Monitoring Dynamics NAV Server Events Using Event Viewer
Monitoring Microsoft Dynamics NAV Server Events
Configuring Microsoft Dynamics NAV Server
Monitoring Long Running SQL Queries using the
Event Log
5/31/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV 2017 is the first version that allows long running SQL queries to be logged to the
Windows Event Log. The queries are logged when the application communicates with the database and the call to
the database takes too long.

Defining Long Running SQL Queries


The time logged in long running SQL queries is the time spent on the called database as seen from the server.
There are multiple reasons that can cause this delay, such as the database waiting for a lock to be released, or the
database executing an operation that perfoms badly due to missing indexes. The threshold of when a query is
logged is controlled in the configuration value of the SqlLongRunningThreshold key. The default value is 1000
milliseconds (ms). For more information about SqlLongRunningThreshold, see Configuring Microsoft Dynamics
NAV Server, database settings section.

Changing Configuration Values


With Microsoft Dynamics NAV 2018, some of the configuration values for the server can be changed in the
memory of the server, without doing a server restart. To change the threshold dynamically to 2000 ms, run the
Dynamics NAV Administration Shell as Administrator and then type the following PowerShell cmdlet:

Set-NAVServerConfiguration -ServerInstance <ServerInstanceName> -KeyName SqlLongRunningThreshold -KeyValue


2000 -ApplyTo Memory

See Also
Configuring Microsoft SQL Server
Set-NAVServerConfiguration
Tools for Monitoring Performance Counters and Events
Monitoring Microsoft Dynamics NAV Server Using Performance Counters
Monitoring Microsoft Dynamics NAV Server Events
Session Timeout Settings and Configuration for
Dynamics NAV
1/2/2018 • 8 min to read • Edit Online

When you start the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Web client, a
connection is established with the Microsoft Dynamics NAV Server instance and a corresponding session is added
on Microsoft Dynamics NAV Server.
Microsoft Dynamics NAV Server includes several timeout settings that determine when a session closes as a result
of inactivity over the client connection, lost client connection, or closing of the client. To help you configure the
timeout settings, this document provides an overview of how the session timeouts work and answers some basic
questions about session behavior.

Session timeout settings overview


This section provides an overview of the settings that are available in Dynamics NAV to control when a Microsoft
Dynamics NAV Server session for a Dynamics NAV client connection times out and closes. Some of the settings
are set on Microsoft Dynamics NAV Server and others are set for the Microsoft Dynamics NAV Windows client or
for the Microsoft Dynamics NAV Web client. For more details about using these settings, see the other sections in
this topic.
Microsoft Dynamics NAV Server timeout settings
The following table describes the session timeout settings that are used by Microsoft Dynamics NAV Server.

SETTING DESCRIPTION REMARKS

ClientServicesReconnectPeriod The amount of time during which a For more information, see Configuring
client can reconnect to an existing How Long a Session Remains Open
session on Microsoft Dynamics NAV after the Client Connection is Lost.
Server before a session closes.

ClientServicesIdleClientTimeout The interval of time that a Dynamics For more information, see Configuring
NAV client connection can remain How Long a Session Remains Open
inactive before the session is closed. When the Client Connection is Inactive.

ClientServicesKeepAliveInterval Specifies the interval (in seconds) This setting is also used, in part, to
between keep-alive messages that are define the reconnect period when a
sent from the Microsoft Dynamics NAV connection is lost. For more
Windows client to Microsoft Dynamics information, see Keeping inactive
NAV Server. sessions alive.

These settings are available in the CustomSettings.config file of Microsoft Dynamics NAV Server. For more
information about this file, see Configuring Microsoft Dynamics NAV Server.
Microsoft Dynamics NAV Web client timeout settings
The following table describes the session timeout settings that are used by the Microsoft Dynamics NAV Web
client.

SETTING DESCRIPTION REMARKS


SETTING DESCRIPTION REMARKS

SessionTimeout Specifies the amount of time that For more information, see Configuring
session remains open when there is no How Long a Session Remains Open
activity over the connection from the When the Client Connection is Inactive.
Microsoft Dynamics NAV Web client to
Microsoft Dynamics NAV Server.

This setting is available in the configuration file of Dynamics Web Server for the client. For more information about
this file, see Configuring the Microsoft Dynamics NAV Web Server and Client.

Configuring How Long a Session Remains Open When the Client


Connection is Inactive
Inactivity on a connection is when the Dynamics NAV client is not sending messages to Microsoft Dynamics NAV
Server. Controlling when a session will timeout and close because of inactivity is different for the Microsoft
Dynamics NAV Windows client and the Microsoft Dynamics NAV Web client.
Configuring the inactive session timeout for the Microsoft Dynamics NAV Windows client
When the Microsoft Dynamics NAV Windows client is inactive, the session will remain open until the time period
that is specified by the ClientServicesIdleClientTimeout setting has passed, provided that the client has not been
stopped or the connection to Microsoft Dynamics NAV Server has not been lost. The default value of the
ClientServicesIdleClientTimeout setting is MaxValue, which means that there is no time limit so the session will
remain active indefinitely.
Configuring the inactive session timeout for the Microsoft Dynamics NAV Web client
There are two settings that control when a Web client session closes because of inactivity on a connection:
ClientServicesIdleClientTimeout setting on Microsoft Dynamics NAV Server.
SessionTimeout setting on the Dynamics NAV Web Server.
The session closes according to the setting that has the shortest time period. By default, the
ClientServicesIdleClientTimeout setting is set to MaxValue, which means no time limit, and the
SessionTimout setting is 00:20:00 (20 minutes). This means that when client connection is inactive, a session
will close after 20 minutes. The following figure illustrates the timeout behavior:

The SessionTimeout setting enables you to set the Microsoft Dynamics NAV Web client inactive session
timeout different than for the Microsoft Dynamics NAV Windows client, which is only controlled by the
ClientServicesIdleClientTimeout setting. Typically, you will set the inactive session timeout period on
Microsoft Dynamics NAV Web client connections shorter than for the Microsoft Dynamics NAV Windows
client.
Keeping inactive sessions alive
To keep an inactive session alive, the Microsoft Dynamics NAV Windows client uses the Windows Communication
Framework (WCF ) reliable sessions feature. When the Microsoft Dynamics NAV Windows client is inactive,
reliable sessions automatically sends messages from the Microsoft Dynamics NAV Windows client to Microsoft
Dynamics NAV Server. You control the interval of the keep-alive messages by setting the
ClientServicesKeepAliveInterval setting on the Microsoft Dynamics NAV Server. The default value of the
ClientServicesKeepAliveInterval setting is 120 seconds (2 minutes).
For most installations, the ClientServicesKeepAliveInterval setting default value sufficient for keeping sessions
open until the ClientServicesIdleClientTimeout setting period elapses. However, when Microsoft Dynamics NAV
Server is installed behind a load balancer, which is the case on Microsoft Azure, you might have to adjust the value
the ClientServicesKeepAliveInterval setting to prevent sessions from closing before the expected session timeout.
A load balancer typically has an idle timeout setting that it uses to determine whether to redirect connections.
However, you want a stable connection between the Microsoft Dynamics NAV Windows client and Microsoft
Dynamics NAV Server. If there is no activity on the client connection for duration of the load balancer's idle timeout
setting, then the load balancer might redirect the client connection to another server. To avoid this condition, we
recommend that you set the ClientServicesKeepAliveInterval to half the value of the load balancer’s idle timeout
setting.

NOTE
The idle timeout on Azure is around 4 minutes, so the default setting of ClientServicesKeepAliveInterval (2 minutes) should
be sufficient.

Configuring How Long a Session Remains Open after the Client


Connection is Lost
Occasionally, a Dynamics NAV client can lose the network connection to Microsoft Dynamics NAV Server. You can
use ClientServicesReconnectPeriod setting on Microsoft Dynamics NAV Server to control how long a session
remains open after the connection is lost to allow time for the client to reconnect to the session.
The time a session remains open actually depends two settings: ClientServiceKeepAliveInterval and
ClientServicesReconnectPeriod. The ClientServiceKeepAliveInterval setting is used to specify an initial inactivity
period. The initial inactivity period is equal to two times the ClientServiceKeepAliveInterval setting value. After this
initial inactivity period, the session remains open for the time period that is specified
ClientServicesReconnectPeriod setting. By default, the ClientServiceKeepAliveInterval setting is 120 seconds (2
minutes) and the ClientServicesReconnectPeriod setting is 10 minutes. This means that Microsoft Dynamics NAV
Server waits approximately 14 minutes for the client to reconnect before closing the session.
The following figure illustrates the reconnect session timeout behavior.

The process that occurs when a client does not reconnect to the session is explained as follows:
1. The connection is lost and the initial inactivity period starts (default is 4 minutes).
2. After the initial inactivity period, the service channel enters a faulted state.
When the service channel is in the faulted state, Microsoft Dynamics NAV Server considers the session with
the client as orphaned and waits for it to reconnect.
3. If the client does not reconnect within the time period that is specified by the ClientServicesReconnectPeriod
setting (default is 10 minutes), then Microsoft Dynamics NAV Server closes the session.
4. The session is then removed from the Active Session table in the Dynamics NAV.

FAQ
This section answers some typical questions about session timeout.
How long does Microsoft Dynamics NAV Server wait when the Microsoft Dynamics NAV Windows client is
inactive before closing a session??
With Microsoft Dynamics NAV Windows client, by default, Microsoft Dynamics NAV Server will wait indefinitely
as long as the client has not been stopped or the connection to Microsoft Dynamics NAV Server has not been lost.
With the Microsoft Dynamics NAV Web client, the session will remain active for 20 minutes. The Microsoft
Dynamics NAV Windows client and Microsoft Dynamics NAV Web client include configuration settings that you
can use to change the inactivity timeout period. For more information, see Configuring How Long a Session
Remains Open When the Client Connection is Inactive.
What happens to the session if I end the Microsoft Dynamics NAV Windows client by using Task Manager?
If the Microsoft Dynamics NAV Windows clientis waiting for a response from Microsoft Dynamics NAV Server, as
is the case with a modal dialog, then the session remains open until the time period that is specified by the
ClientServicesReconnectPeriod setting expires. When the Window Client process is ended, the service channel will
enter a faulted state. Microsoft Dynamics NAV Server considers the session with the Microsoft Dynamics NAV
client as orphaned and waits for it to reconnect.
What happens to the session if the client loses the connection to Microsoft Dynamics NAV Server?
By default, it will take approximately 14 minutes for the Microsoft Dynamics NAV Server to close the current
session. The time it takes to close the session is in part determined by the ClientServicesReconnectPeriod setting on
Microsoft Dynamics NAV Server plus an initial 10 minute inactivity period. For more information, see Configuring
How Long a Session Remains Open after the Client Connection is Lost.
What happens if the session is still active when Microsoft Dynamics NAV Server tries to close it?
1. The server stops any executing threads when the next statement is to be executed and the current call stack
is aborted so any uncommitted transactions will be rolled back.
2. The server cancels any callbacks to the client (similar to waiting for the response to a Confirm dialog).
3. The session is closed, and then removed from the Active Session table.

See Also
Configuring Microsoft Dynamics NAV
Connecting the Microsoft Dynamics NAV Clients over
a Wide Area Network
1/2/2018 • 1 min to read • Edit Online

This topic contains information about how to implement a secure Microsoft Dynamics NAV Windows client
connection to Microsoft Dynamics NAV Server over a wide area network (WAN ). The Microsoft Dynamics NAV
Windows client and Microsoft Dynamics NAV Server computers can be in the same or separate Active Directory
domains.
For additional information about hosting and WAN connections, see the Microsoft Dynamics NAV Team Blog and
search for the terms hosting and performance.

Assumptions
The implementation that is used in these topics assumes the following:
User accounts are provisioned in an Active Directory domain. SQL Server and Microsoft Dynamics NAV
Server are installed on a computer in this domain.
The administrator who is creating this implementation is a member of the domain administrator group in
this domain.
On the computer that is running Microsoft Dynamics NAV Server, a DNS entry that resolves to the
published server port on the computer’s firewall exists for Microsoft Dynamics NAV Server.
If the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Server is behind a firewall,
then you must open a port to communicate with Microsoft Dynamics NAV Server on the Microsoft
Dynamics NAV Windows client computer and publish the port on the Microsoft Dynamics NAV Server
computer. The default port number is 7046.
The Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV Server are configured as
described in the Walkthrough: Installing the Three Tiers on Three Computers topic in the MSDN Library.

Implementing the Windows Client over a Wide Area Network


The implementation that is shown in these topics includes instructions for protecting your WAN connections with
security certificates. We recommend that you do not implement remote access without security certificates.

TO SEE

Read about the certificate security implementation that is Using Certificates to Secure a Remote Client Connection
presented in this implementation.

Follow a detailed demonstration of how to set up an Walkthrough: Implementing Security Certificates in a Test
environment for testing secure connections over a WAN by Environment
using the chain trust configuration.

Learn how to implement security certificates in a production How to: Implement Security Certificates in a Production
environment. Environment
Exporting and Importing Companies and Other Data
1/2/2018 • 6 min to read • Edit Online

You can export a company from a Dynamics NAV database and import it into another database, and you can
export and import other types of data such as global data, application data, and application objects.
In earlier versions of Dynamics NAV, you exported and imported this type of data as part of backing up and
restoring databases. In Microsoft Dynamics NAV 2018, you can do this by using the Export-NAVData and
Import-NAVData Windows PowerShell cmdlets. You can also import and export data in the Microsoft Dynamics
NAV Windows client and the Microsoft Dynamics NAV Web client.

IMPORTANT
If you want to back up data, we recommend that you use the SQL Server management tools.

Reuse of Companies, Data, and Applications


You can back up and restore databases using the SQL Server management tools, but sometimes you want to move
only part of the data in a database to another database. For example, you can set up a test environment in a
Dynamics NAV database with a demonstration company. You can then export that demonstration company and
import it in other databases so you can train users in your solution. In other cases, you want to export application
objects and metadata in order to solve a problem in an existing customer's database without taking the customer
offline, for example. In those cases, you can export the relevant data to a file and share the data that way.
When you export data from a Dynamics NAV database, the data is stored in a file with the extension .navdata.
This file cannot be modified in external tools. The data that you export is not deleted from the original database.

WARNING
When you export data to a .navdata file, you must import the data into a database that is compatible with the data in the
.navdata file. For example, you cannot import a company into a database that has a different database schema, and you
cannot import Microsoft Dynamics NAV 2013 data into a Microsoft Dynamics NAV 2018 database. Also, you must import a
company into a database that contains the data and application that the company's data depends on.

This means that you must import a company into a database that is based on the same application as in the
database that the company was exported from.

IMPORTANT
If you export companies and other data that is secured by data encryption, then remember to also export the encryption key
so that you can access the data after you import it into another database, for example when you restore a backup. For more
information, see Manage Data Encryption

What to Export
You can export specific sets of data, such as a company or other data. The following table describes what is
exported depending on your choices.
TYPE OF DATA DESCRIPTION

Company Exports the specified company or companies, or all companies


in the database. This includes the company-specific business
data but no other data.

Global data Exports data that is common to all companies in the database.
This includes the report list, user IDs, and printer selections,
but no company-specific business data.

Application data Exports the data that defines the application in the database.
This includes the permissions, permission sets, profiles, and
style sheets.

Application Exports all application objects. Data is not included.

This is similar to exporting all objects to an .fob file.

What to Import
You can import all data from a .navdata file, or you can choose the data that you want to import. For example, if the
file contains four companies, you can choose to import only one company. Similarly, if the file contains all data, you
can choose to import only global data, for example. To import applications, you must use the Import-NAVData
Windows PowerShell cmdlet. You can import other data, such as companies, in the Microsoft Dynamics NAV
Windows client and the Microsoft Dynamics NAV Web client.
You can export and import the four types of data in different combinations. However, you must maintain database
integrity and not leave databases in a state when you cannot open Dynamics NAV.

IMPORTANT
If you import application data but not the application, you cannot access the database from Dynamics NAV. Similarly, if you
import global data into a database that does not contain a company, you cannot open Dynamics NAV.
Also, we recommend that you do not import an application into a database that users are accessing. A new application often
defines a new database schema that changes the structure of the business data.

Windows PowerShell Cmdlets


You can import and export data in the Microsoft Dynamics NAV Administration Shell. The following table
describes the available Windows PowerShell cmdlets. For more information, see Administration Cmdlets for
Microsoft Dynamics NAV.

NAME DESCRIPTION

Export-NAVData Exports data from a Dynamics NAV database. You can export
company-specific data, and you can choose to include global
data, application data, or application objects.

Import-NAVData Imports data into a Dynamics NAV database from a file. You
can import all data in the file, or you can choose to include
specific companies, global data, application data, or application
objects.

You can only import an application into an empty database.


NAME DESCRIPTION

Get-NAVDataFile Gets information from a file that has been exported from a
Dynamics NAV database.

The extracted information includes the types of data that the


file contains and any company names.

The cmdlets take different parameter sets depending on how you connect to the database that you want to export
data from or import data into. You can access the database through the Microsoft Dynamics NAV Server instance,
or you can access the database directly as described in the following table.

ACCESS DESCRIPTION

Through the Microsoft Dynamics NAV Server instance. Use parameter sets that include –ServerInstance when the
database that you want to access is mounted against a
Microsoft Dynamics NAV Server instance.

The user account for the Microsoft Dynamics NAV Server


instance must have access to write to the location that is
specified by the –FilePath parameter.

Through a direct connection to the database. Use parameter sets that include –DatabaseServer and –
DatabaseName when the Microsoft Dynamics NAV Server
instance is stopped or not available. For example, if you want
to import an updated application into a database, you stop
the service so that users cannot access the database.

You must have access to write to the location that is specified


by the –FilePath parameter.

In multitenant deployments of Dynamics NAV, if you export or import business data, you must specify the ID of
the tenant database. If you export or import applications, you must specify the application database and database
server. You can only import application data if the specified tenant is mounted with the –AllowAppDatabaseWrite
parameter.
C/AL Functions
You can use the following C/AL functions to handle export and import of data programmatically:
EXPORTDATA Function (Database)
IMPORTDATA Function (Database)
DATAFILEINFORMATION Function (Database)
For examples of how to use these functions, see page 9900 and 9901 in the CRONUS International Ltd.
demonstration database.

See Also
How to: Export and Import Companies and Other Data using Windows PowerShell Cmdlets
How to: Export and Import Companies and Other Data in Clients
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Integrating Dynamics NAV and Microsoft Office
1/2/2018 • 2 min to read • Edit Online

Dynamics NAV includes several features that work with Microsoft Office products, including Excel, Word,
OneNote, Outlook, and SharePoint. Some of the features require only that Office is installed on or accessible from
the devices that are running the Dynamics NAV clients, whereas other features require additional configuration.
Depending on the feature, some configuration tasks are performed on the Dynamics NAV deployment
environment, such as configuring the Microsoft Dynamics NAV Server instance. These tasks are typically done by
the system or IT administrator. Other tasks are performed on the application from the Dynamics NAV clients, such
as configuring user accounts. These tasks are typically done by the business application administrator.
The following table describes the available features:

OFFICE PRODUCT FEATURE INFORMATION

Excel and Word Users can send Dynamics NAV data on The basic requirement for this feature is
pages to Excel, Word, or in an email. that Office is accessible from the clients.
For more information, see:

How to: Send Data to Other Programs

Default Behavior When Sending


Documents to Office

If users have exported data from This feature requires that you install the
Dynamics NAV to Excel, they can refresh Microsoft Office Excel Add-In on the
Excel to get the latest data from client by using the Dynamics NAV
Dynamics NAV. If they made changes to Setup. For more information, see:
the data in Excel, then these changes Client Option in Setup
are overwritten when they refresh the
data. How to: Refresh Data from Excel

Users can work with data from list Setting up the Excel Add-In for Editing
pages in Excel. Users can get fresh data Data
from Dynamics NAV and update the
data in Dynamics NAV based on their
work in Excel.

When users export Dynamics NAV Integrating with Office 365 and
documents to Excel, Word, or other SharePoint Online
Microsoft Office products, the data can
be stored on SharePoint Online and
accessed using Office 365.

OneNote Users can synchronize notes from Integrating with Microsoft OneNote
OneNote with Dynamics NAV, and also
use OneNote to share pictures,
recordings, and other instructions
across a company.

Outlook Users can synchronize data, such as to- Microsoft Office Outlook Add-In
dos, contacts, and tasks, between
Dynamics NAV and Outlook.
OFFICE PRODUCT FEATURE INFORMATION

Users can complete Dynamics NAV Setting Up the Office Add-Ins for
business tasks from their Outlook inbox. Outlook Inbox Integration
Dynamics NAV customer or vendor
information is available in Outlook
emails and calendar appointments.
Users to create, send, and view
Dynamics NAV business documents,
such a sales quotes and invoices to a
contact, directly in emails.

See Also
Configuring Microsoft Dynamics NAV Server
Integrating Microsoft Dynamics NAV in SharePoint
Sites
1/2/2018 • 7 min to read • Edit Online

You can set up Dynamics NAV to be available as an app for SharePoint. This means that Dynamics NAV data can
be shown in a SharePoint site, and that you can modify the data on the SharePoint site through the Microsoft
Dynamics NAV Web client.
You can deploy Dynamics NAV as an app for SharePoint Online and SharePoint on-premises.

SharePoint and Dynamics NAV


If you set up a SharePoint site, you can add Dynamics NAV as an app to the site so that the Microsoft Dynamics
NAV Web client opens when the user chooses an icon. Then, you can add web parts that show Dynamics NAV
data, such as a list of sales invoices with overdue payments. Users can drill down into the data and the web parts
will open the relevant page in the Microsoft Dynamics NAV Web client when the user chooses an icon or a link.
For example, if you provide financial services to several subscribers, you want your subscribers to be able to see
their data in a SharePoint site. In that case, you can create separate subsites for each subscriber so that they have
access to only their data. Their data is stored in dedicated business databases, because you have deployed your
Dynamics NAV solution in a multitenant deployment architecture. You add Dynamics NAV as an app so that users
can open the Microsoft Dynamics NAV Web client when they choose an icon, and they are signed in to Dynamics
NAV automatically. Then, you add parts to show the subscriber’s list of unpaid sales invoices, or a chart that
reflects top sales. When the user chooses the list of unpaid sales invoices, the underlying page from Microsoft
Dynamics NAV Web client opens as a seamless part of the SharePoint site. The user can filter and modify the data
without having to sign in to a new site.

WARNING
The users' access to Dynamics NAV is not restricted to the page that you expose in SharePoint. You must assign the relevant
permissions to each user in Dynamics NAV.

You can set up a site collection with a site for each subscriber to your services, or you can set up a single site with
general information. In this scenario, your Dynamics NAV implementation is most likely to be a multitenant
deployment with a tenant for each of your subscribers. But you can choose other deployment scenarios, such as
using Dynamics NAV companies in shared databases for your subscribers. Similarly, you can deploy Dynamics
NAV as an app for SharePoint that is used internally exclusively by users in your own organization. In general, the
configuration of the app and how Dynamics NAV and SharePoint interact are the same in both scenarios.

Deploying Dynamics NAV for Integration with SharePoint


To integrate with SharePoint, you must have a Microsoft Dynamics NAV Server and Dynamics NAV Web Server
instance. These components can be deployed on-premise or on a cloud service, such as Microsoft Azure.
The Microsoft Dynamics NAV Server instance that you want your app for SharePoint to access must be
configured for multitenancy and configured with AccessControlService as the credential type. For more
information, see Authenticating Users with Azure Active Directory.
The Microsoft Dynamics NAV Web Server components instance that you want to use for your app for
SharePoint must be configured to be able to run in the SharePoint site. The default configuration prevents
the Microsoft Dynamics NAV Web client from running inside an iframe in an external website. If you want
to show Dynamics NAV data in app parts, you must remove the X-FRAME -OPTIONS setting in the
web.config file. For more information, see Embedding the Microsoft Dynamics NAV Web Client in a
Website on Another Web Server.
The Microsoft Dynamics NAV Web Server components instance must be configured to use secure
authentication and SSL. For more information, see How to: Configure SSL to Secure the Connection to
Microsoft Dynamics NAV Web Client.
Each user who will access Dynamics NAV from your app for SharePoint must be set up in Dynamics NAV.
For example, create the users with Windows authentication or with user name/password authentication,
depending on your deployment scenario. But you must also specify an authentication email address on the
Office 365 Authentication FastTab in the User Card window. The authentication email address must be
the same account that the users log on to Office 365 or SharePoint Online with. If you set up this account in
your Microsoft Azure AD tenant, you achieve a deeper integration between SharePoint and Dynamics NAV.
By creating the users of the SharePoint site as users in Dynamics NAV with this authentication email
address, they achieve single sign-on when they access Microsoft Dynamics NAV Web client from the
SharePoint site, for example. For more information, see How to: Create Microsoft Dynamics NAV Users.

Building an App for SharePoint


In order to add Dynamics NAV as an app to a SharePoint site, you must create a provider-hosted app for
SharePoint in Visual Studio. This includes configuring an appManifest.xml file, so that the app can be added to a
site. The app manifest describes metadata such as the title, the publisher, and the URL of start page for the
Microsoft Dynamics NAV Web client so that the app will open the relevant Microsoft Dynamics NAV Web client
address. Also, you can add one or more client web parts for the Dynamics NAV pages that you want to show on
the SharePoint site. You can choose to use an already existing page, or you can create specific pages that are only
used for SharePoint. For example, you can create a part that is based on page ID 9305, Sales Order List. Then, you
deploy the app to your SharePoint site, and you add the part as an app part that will show the page in the
Microsoft Dynamics NAV Web client as a list of sales orders without navigation elements. The list resembles any
other list in SharePoint, but it is the Microsoft Dynamics NAV Web client, and the data is current. For more
information, see Embedding Microsoft Dynamics NAV Web Client Pages in Other Websites and Developing and
Installing a Microsoft Dynamics NAV Apps for SharePoint.
Apps for SharePoint and Multitenant Deployments of Dynamics NAV
You can deploy Dynamics NAV in a multitenant deployment architecture. When you create an app for SharePoint
that will access the Microsoft Dynamics NAV Web client, you must decide if you want to deploy the app for a
specific tenant, or if the app can be used by all tenants that are mounted against a Microsoft Dynamics NAV Server
instance. Then, in the app manifest for the app, you include a tenant parameter in start page URL according to the
following:
If you want the app to apply to a specific tenant only, then set the tenant parameter to the tenant ID, such as
https://www.solutions.com/DynamicsNAV/?tenant=tenant1 or
https://www.solutions.com/DynamicsNAV/WebClient/?tenant=tenant1* (for Microsoft Dynamics NAV
2017 and earlier versions). In this example, the tenant ID is tenant1. The value of the tenant parameter must
be included in tenants list of alternative IDs.
Alternatively, if you have configured the Microsoft Dynamics NAV Web Server components to accept host
names, you can specify the host name in the URL in the app manifest. For more information, see How to:
Configure the Microsoft Dynamics NAV Web client to Accept Host Names for Tenants.
If you want the app to apply to all tenants, then set the tenant parameter to {HostUrl}, such as
https://www.solutions.com/DynamicsNAV/?tenant={HostUrl} or
https://www.solutions.com/DynamicsNAV/WebClient/?tenant={HostUrl}(for Microsoft Dynamics NAV 2017
and earlier versions).
When the app accesses the Microsoft Dynamics NAV Web client, HostUrl is automatically replaced by the
SharePoint site address where the app is installed. Because the SharePoint site is tenant-specific, this
parameter identifies the tenant.
You must include all SharePoint site addresses that can access a tenant in the tenant's list of alternative IDs.

NOTE
For more information about how to set alternate IDs for tenants, see How to: Mount or Dismount a Tenant on a Microsoft
Dynamics Server Instance.

Installing Dynamics NAV as an App


When you have built your app for SharePoint in Visual Studio, you must publish it in order to create the
deployment package. Depending on your scenario, you can deploy the app to SharePoint in different ways.
For example, you can publish the app to the SharePoint store so that it is accessible for others to install on their
SharePoint sites.
If you want to install the app only on your own SharePoint sites, you can upload it to your SharePoint app catalog
from where you can install it to the relevant SharePoint sites. For example, if you have a SharePoint site collection
with a site that is used internally and a site that is publicly available. Then, you can add different parts to the two
sites, such as a read-only part on the public site, and an editable part on the internal site. For more information, see
Developing and Installing a Microsoft Dynamics NAV Apps for SharePoint.

See Also
Multitenant Deployment Architecture
Developing and Installing a Microsoft Dynamics NAV Apps for SharePoint
Authenticating Users with Azure Active Directory
Troubleshooting: Microsoft Dynamics NAV and SharePoint
Configuring Authentication and Single Sign-On Between Microsoft Dynamics NAV and SharePoint
Security and Protection
1/2/2018 • 1 min to read • Edit Online

An enterprise business solution must have a built-in security system that helps protect your database and the
information that it contains from unauthorized access. It must also allow you to specify what authorized users are
allowed to do in the database, such as what data they can read and modify.
Microsoft Dynamics NAV 2018 provides a security system that allows administrators to manage user access to
the objects and data in the Dynamics NAV database. Because the Dynamics NAV database is on SQL Server, the
Dynamics NAV security system and SQL Server security system work together to help ensure that only
authorized users can gain access to the Dynamics NAV database.
For more information, see the following topics:
Managing Users
About Permissions.
Managing Permissions and Permission Sets
Profiles and Role Centers

See Also
Security Overview
Enhancing Microsoft Dynamics NAV Server Security
Security Considerations
Customizing Security
Data Security
Business Areas and Granules
Security Overview
1/2/2018 • 1 min to read • Edit Online

You can use the following table as a checklist to help set up a more secure Dynamics NAV environment.

TO SEE

Install Dynamics NAV software. You must make decisions about where you install Dynamics
NAV components.

Working with Microsoft Dynamics NAV Setup

Activate your Dynamics NAV license. How to: Upload the License File

Create users. How to: Create Microsoft Dynamics NAV Users

Assign users to permission sets. How to: Define Permissions for Users

Configure Role Centers. Profiles and Role Centers

Assign users to profiles. Managing Users

See Also
Security and Protection
Enhancing Microsoft Dynamics NAV Server Security
Enhancing Microsoft Dynamics NAV Server Security
4/26/2018 • 2 min to read • Edit Online

Microsoft Dynamics NAV Server is a .NET-based Windows Service application that works exclusively with SQL
Server databases. Microsoft Dynamics NAV Server provides an additional layer of security between clients and
the database. It leverages the authentication features of the Windows Communications Framework to provide
another layer of user authentication and uses impersonation to ensure that business logic is executed in a process
that has been instantiated by the user who submitted the request. This means that authorization and logging of
user requests are performed on a per-user basis.

Login Account
After you install Microsoft Dynamics NAV Server, the default configuration is for the service to log on using the
NT Authority\Network Service account. If Microsoft Dynamics NAV Server and SQL Server are on different
computers, then we recommend that you configure Microsoft Dynamics NAV Server to log on using a dedicated
Windows domain user account instead. This account should not be an administrator either in the domain or on
any local computer. A dedicated domain user account is considered more secure because no other services and
therefore no other users have permissions for this account.

Disk Quotas
Client users can send files to be stored on Microsoft Dynamics NAV Server, so we recommend that
administrators set up disk quotas on all computers running Microsoft Dynamics NAV Server. This can prevent
users from uploading too many files, which can make the server unstable. Disk quotas track and control disk
space usage for NTFS volumes, which allows administrators to control the amount of data that each user can
store on a specific NTFS volume. For more information about disk quotas, see the Disk Quotas Technical
Reference on Microsoft TechNet.

Limiting Port Access


The Microsoft Dynamics NAV Setup program opens a port in the firewall on the computer where you install
Microsoft Dynamics NAV Server. By default, this is port 7046. To improve security, you can consider limiting
access to this port to a specific subnet. One way is to use netsh , which is a command-line tool for configuring
and monitoring Windows-based computers at a command prompt. The specific version of this command that you
would use is netsh firewall set portopening . For example, the following command limits access to port 7046 to
the specified addresses and subnets:

netsh firewall set portopening protocol=TCP port=7046 scope=subnet addresses=LocalSubnet

Data Encryption Between Microsoft Dynamics NAV Server and SQL


Server
When SQL Server and Microsoft Dynamics NAV Server are running on different computers, you can make this
data channel more secure by encrypting the connection with IPSec. (Other encryption options are not supported.)
For information on how to do this, see Encrypting Connections to SQL Server, which is part of SQL Server 2008
Books Online in MSDN library.
See Also
Walkthrough: Installing the Three Tiers on Three Computers
Configuring Microsoft Dynamics NAV Server
Security Overview
How to Use the Netsh.exe Tool and Command-Line Switches
Transparent Data Encryption (TDE )
Transparent Data Encryption (TDE)
5/14/2018 • 1 min to read • Edit Online

You can use Transparent Data Encryption (TDE ) to encrypt SQL Server and Azure SQL Database data files at rest.
In a scenario where the physical media (such as drives or backup tapes) are stolen, a malicious party can just
restore or attach the database and browse the data. With TDE you can encrypt the sensitive data in the database
and protect the keys that are used to encrypt the data with a certificate. TDE performs real-time I/O encryption
and decryption of the data and log files to protect data at rest. TDE can assist in the ability to comply with many
laws, regulations, and guidelines established in various industries.

IMPORTANT
TDE does not provide encryption across communication channels. For more information about how to encrypt data across
the communication channel between the database and the Microsoft Dynamics NAV Server, see Enhancing Microsoft
Dynamics NAV Server Security.

Cau t i on

Backup files of databases that have TDE enabled are also encrypted by using the database encryption key. As a
result, when you restore these backups, the certificate protecting the database encryption key must be available.
This means that in addition to backing up the database, you must make sure that you also maintain backups of the
server certificates to prevent data loss. Data loss will result if the certificate is no longer available.
For more information about TDE, see Transparent Data Encryption (TDE )

See Also
Classifying Data
Data Security
Enhancing Microsoft Dynamics NAV Server Security
Deploy a Microsoft Dynamics NAV Database to Azure SQL Database
Data Security
4/26/2018 • 1 min to read • Edit Online

The Microsoft Dynamics NAV security system allows you to control which objects or tables a user can access
within each database. You can specify the type of access that each user has to these objects and tables, whether
they are able to read, modify, or enter data.

The Microsoft Dynamics NAV Security System


You can specify which records are stored in the tables that each user is allowed to access. This means that
permissions can be allocated at both the table level and the record level.
The security system contains information about the permissions that have been granted to each user who can
access a particular database.
This information includes the roles that the users have been assigned, as well as any permissions that they have
been granted to individual users.
There are four different levels of security:
Database
Company
Object
Record
Graphically, these can be represented as the layers, where the central layer is the records in the database.

See Also
Database-Level Security
Users and Credential Types
Database Logins
Company-Level Security
Object-Level Security
Permissions on Database Objects
Record-Level Security
Security Considerations
Transparent Data Encryption (TDE )
Configuring User Authentication
1/2/2018 • 1 min to read • Edit Online

Read these articles to learn about how to configure Dynamics NAV to authenticate users.
Users and Credential Types
Authenticating Users with Microsoft Azure Access Control Service
Authenticating Users with Azure Active Directory
Authenticating Users with Active Directory Federation Services

See Also
Managing Users
Managing Permissions and Permission Sets
Business Areas and Functional Areas
1/2/2018 • 1 min to read • Edit Online

Microsoft Dynamics NAV is divided into several business areas. Each business area consists of a number of
functional areas.

Business Areas and Functional Areas


The following table shows all of the business areas and functional areas. Each functional area represents an
important field of activity.

BUSINESS AREAS FUNCTIONAL AREAS

Finance Management Cash Management

Fixed Assets

General Ledger

Inventory

Payables

Receivables

Sales & Marketing Sales Analysis & Reporting

History

Inventory & Pricing

Marketing

Order Processing

Purchase Analysis & Reporting

History

Inventory & Costing

Order Processing

Planning

Warehouse Goods Handling

History

Inventory

Orders & Contacts

Planning & Education


BUSINESS AREAS FUNCTIONAL AREAS

Manufacturing Capacities

Costing

Execution

History

Planning

Product Design

Jobs History

Jobs

Periodic Activities

Reports

Resource Planning History

Periodic Activities

Reports

Resources

Service Contact Management

History

Order Processing

Planning & Dispatching

Human Resources Absence Registration

Employees

Reports

IT Administrator Application Setup

IT Administration

See Also
Granules Available in the General Ledger
Upgrading to Microsoft Dynamics NAV 2018
4/26/2018 • 2 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
This topic provides an overview of how to upgrade to Microsoft Dynamics NAV 2018. The upgrade process
depends on different factors, such as the version of Dynamics NAV that you are upgrading from, and the degree
to which your solution differs from the standard version of Dynamics NAV. The mains tasks range from
converting the database to upgrading application code and data.
Use the following table to determine the procedures that you must complete for your upgrade scenario.

SCENARIO PROCEDURES

Full upgrade from one of the following versions: 1. Upgrade the Application Code
Microsoft Dynamics NAV 2015 2. Upgrade the Data
Microsoft Dynamics NAV 2016
Microsoft Dynamics NAV 2017

Full upgrade from one of the following versions: 1. Upgrade to Microsoft Dynamics NAV 2018
Microsoft Dynamics NAV 2013 Cumulative Update 2:
Microsoft Dynamics NAV 2013 R2 1. Download Microsoft Dynamics NAV 2018 CU2.
2. Upgrade the Application Code
3. Upgrade the Data
2. Upgrade to the latest Microsoft Dynamics NAV 2018
cumulative update (CU):
1. Upgrade the Application Code
2. Upgrade the Data

Full upgrade from one of the following versions: 1. Upgrade to Microsoft Dynamics NAV 2013.
Microsoft Dynamics NAV 2009 SP1 For more information, see Upgrading to Microsoft
Microsoft Dynamics NAV 2009 R2 Dynamics NAV 2013 in the MSDN Library.
Microsoft Dynamics NAV 5.0
Microsoft Dynamics NAV 4.0 Alternatively, you can upgrade from Microsoft
Dynamics NAV 2009 SP1 or Microsoft Dynamics NAV
2009 R2 to Microsoft Dynamics NAV 2015 as
described on the Dynamics NAV Team Blog.
2. Upgrade to Microsoft Dynamics NAV 2018
Cumulative Update 2.
1. Download Microsoft Dynamics NAV 2018 CU2.
2. Upgrade the Application Code
3. Upgrade the Data
3. Upgrade to the latest Microsoft Dynamics NAV 2018
cumulative update (CU) by following steps a and b
above.
After the upgrade, links between interaction records and
logged email messages is lost. To resolve this issue, the
administrator has to log all mails again to restore the links.
For more information, see Logging Interaction Links are Lost
When You Upgrade from Microsoft Dynamics NAV 2009 R2.
SCENARIO PROCEDURES

Technical upgrade of Microsoft Dynamics NAV 2018 database Converting a Database


to a new platform version with no application changes, such
as with a cummulative update
You can also use this procedure to convert a previous
Dynamics NAV database to Microsoft Dynamics NAV 2018
technical requirements, and then upgrade the application and
data later.

Before you begin the upgrade process, see Upgrade Considerations for tips about things to consider when you
prepare to upgrade to Microsoft Dynamics NAV 2018.

Automating the Upgrade Process using Sample Windows PowerShell


Scripts
You can use Windows PowerShell scripts to help you upgrade to Microsoft Dynamics NAV 2018. You can use
automation to upgrade a single Dynamics NAV database as well as multiple Dynamics NAV databases that use
the same application. Microsoft Dynamics NAV 2018 provides sample scripts that you can adapt for your
deployment architecture. For more information, see Automating the Upgrade Process using Sample Windows
PowerShell Scripts.

See Also
Product and Architecture Overview
Migrating to Multitenancy
Deployment
Transforming Forms to Pages
Considerations for Upgrading Dynamics NAV
1/2/2018 • 3 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
Depending on which version you are upgrading from, and the degree to which your solution differs from the
standard version of Dynamics NAV, you may want to prepare your solution for the upgrade. This topic provides
tips for things to consider when you prepare to upgrade to Microsoft Dynamics NAV 2018.

Names of Variables
Microsoft Dynamics NAV 2018 introduces new functions and statements. If your solution includes variables where
the name is now used by a standard C/AL function or statement such as REGISTERTABLECONNECTION or
FOREACH, you must change the variables before you upgrade to Microsoft Dynamics NAV 2018. Alternatively,
you can enclose the variable names in quotation marks. If you do not, and you import an object that has this code
in text format, you cannot compile the object. For more information, see Changes in C/AL Behavior and Support
from Earlier Versions of Microsoft Dynamics NAV.

Deprecated or Redesigned Functionality


If you are upgrading a solution that depends on functionality that is deprecated or changed in the default version
of Microsoft Dynamics NAV 2018, you must verify that the upgrade codeunits migrate data correctly. See the See
Also section for links to descriptions of deprecated functionality.

Upgrade Codeunits
When you introduce changes to the database schema in Microsoft Dynamics NAV 2018, Dynamics NAV will check
if these changes are destructive or not. If the database check indicates that the change may lead to data deletion,
such as if you are dropping a table column so that the contents of that column will be deleted, this is considered a
destructive change. You will be prompted to handle the situation using upgrade codeunits. For more information,
see Upgrade Codeunits.

Company Names
If a company name includes a special character, an error may display during the upgrade. In this context, special
characters include the following:
[~@#$%&*().!%-+/=?]
If you are going to upgrade a database where one or more company name includes a special character, we
recommend that you rename the company before you start the upgrade process. After the upgrade is successfully
finished, you can rename the company again.

System Tables with Non-English Names


In the oldest versions of Dynamics NAV, you could translate the columns in system tables to a language other than
English. Starting with version 3.0, we advised heavily against this, and versions later than Microsoft Dynamics
NAV 2013 R2 require that all columns in all system tables are in English. As a result, if you try to open a database
with non-English system tables in Microsoft Dynamics NAV 2013 R2 or later, an error displays, saying that one or
more columns do not exist.
Make sure that all objects where compiled in a development environment with the right .ETX and .STX files. You
can verify that you are running in the correct environment with English (US ) as the base language by opening the
ndo$dbproperty table in SQL Server Management Studio. In the Identifiers column, the word Object must be
written exactly as shown here.

Deprecated Fields and Fields Marked as Obsolete


Sometimes Microsoft will refactor code so that fields are no longer used, or the functionality is moved from the
base application to an extension, for example. Typically, the upgrade toolkit will manage the upgrade impact, but
for transparency, you can find a list of fields that are deprecated in the current release or marked to be obsolete in
a later release. For more information, see Deprecated Fields, and Fields Marked as Obsolete

See Also
Upgrading to Microsoft Dynamics NAV 2017
Upgrading the Application Code
Upgrading the Data
Changes in C/AL Behavior and Support from Earlier Versions of Microsoft Dynamics NAV
Deprecated Fields, and Fields Marked as Obsolete
Deprecated Features in the UK Version of Microsoft Dynamics NAV 2018
Deprecated Fields, and Fields Marked as Obsolete
12/1/2017 • 7 min to read • Edit Online

In the Microsoft Dynamics NAV 2018, a number of fields have been deprecated in the current release or marked
to be obsolete in a later release.

Definitions
Deprecated fields fall into one of the following groups:
1. Fields moved to an extension by Microsoft
Partner impact: Remember to install the extension when you upgrade an existing solution from an earlier
version of Dynamics NAV.
2. Fields marked as Obsolete:Pending
Partner impact: None in the current release, this is just a heads-up that a change is coming.
3. Fields no longer in use in Microsoft code
Partner impact: Refactor your code as soon as possible.

Fields moved to an extension by Microsoft in Microsoft Dynamics


NAV 2018
A number of fields have been moved from the base application to an extension.
Denmark
The functionality for payments and reconciliation in the Danish version (FIK) has been moved to the Payments
and Reconciliations (DK) extension. For more information, see The Payments and Reconciliations (DK) Extension
in the Dynamics 365 Business Central documentation.

TABLE ID TABLE NAME OLD FIELD ID NEW FIELD ID OLD FIELD NAME NEW FIELD NAME

23 Vendor 13650 13651 Giro Acc No. GiroAccNo

25 Vendor Ledger 13650 13651 Giro Acc No. GiroAccNo


Entry

38 Purchase Header 13650 13651 Giro Acc No. GiroAccNo

79 Company 13600 13651 Bank Creditor BankCreditorNo


Information No.

81 General Journal 13650 13651 Giro Acc No. GiroAccNo


Line

122 Purchase Invoice 13650 13651 Giro Acc No. GiroAccNo


Header
TABLE ID TABLE NAME OLD FIELD ID NEW FIELD ID OLD FIELD NAME NEW FIELD NAME

273 Bank Acc. 13600 13601 FIK Payment FIKPaymentReco


Reconciliation Reconciliation nciliation

274 Bank Acc. 13600 13601 Payment PaymentReferenc


Reconciliation Reference e
Line

289 Payment Method 13601 13652 Payment Type PaymentTypeVali


Validation dation

372 Payment Buffer 13650 13651 Giro Acc No. GiroAccNo

1226 Payment Export 13650 13651 Recipient Giro RecipientGiroAcc


Data Acc No. No

1250 Bank Statement 13601 13652 Match Status MatchStatus


Matching Buffer

1250 Bank Statement 13600 13653 Description DescriptionBankS


Matching Buffer tatement

Fields marked as ObsoleteState:Pending in Microsoft Dynamics NAV


2018
A number of fields are marked as ObsoleteState:Pending. There is no impact on code in this release.
United Kingdom
The following fields are marked as ObsoleteState:Pending in the UK version.

TABLE ID FIELD ID COMMENTS

18 10500 Will be removed in a later release.

23 10500 Will be removed in a later release.

36 10501 Will be removed in a later release.

38 10501 Will be removed in a later release.

112 10501 Will be removed in a later release.

114 10501 Will be removed in a later release.

122 10501 Will be removed in a later release.

124 10501 Will be removed in a later release.

5107 10501 Will be removed in a later release.

5109 10501 Will be removed in a later release.

A number of fields are also deleted in the UK version. For more information, see Deprecated Features in the UK
Version.
Denmark
The following fields are marked as ObsoleteState:Pending in the Danish version.

TABLE ID FIELD ID COMMENTS

3 13600 Will be removed in a later release.

4 13600 Will be removed in a later release.

9 13600 Will be removed in a later release.

18 13605 Will be removed in a later release.

36 13600 Will be removed in a later release.

36 13601 Will be removed in a later release.

36 13602 Will be removed in a later release.

36 13604 Will be removed in a later release.

36 13605 Will be removed in a later release.

36 13606 Will be removed in a later release.

36 13607 Will be removed in a later release.

36 13620 Will be removed in a later release.

37 13600 Will be removed in a later release.

295 13600 Will be removed in a later release.

295 13602 Will be removed in a later release.

295 13605 Will be removed in a later release.

295 13606 Will be removed in a later release.

295 13607 Will be removed in a later release.

295 13608 Will be removed in a later release.

295 13620 Will be removed in a later release.

296 13600 Will be removed in a later release.

297 13600 Will be removed in a later release.

297 13601 Will be removed in a later release.


TABLE ID FIELD ID COMMENTS

297 13602 Will be removed in a later release.

297 13605 Will be removed in a later release.

297 13606 Will be removed in a later release.

297 13607 Will be removed in a later release.

297 13608 Will be removed in a later release.

297 13620 Will be removed in a later release.

298 13600 Will be removed in a later release.

302 13600 Will be removed in a later release.

302 13601 Will be removed in a later release.

302 13602 Will be removed in a later release.

302 13605 Will be removed in a later release.

302 13606 Will be removed in a later release.

302 13607 Will be removed in a later release.

302 13608 Will be removed in a later release.

302 13620 Will be removed in a later release.

303 13600 Will be removed in a later release.

304 13600 Will be removed in a later release.

304 13601 Will be removed in a later release.

304 13602 Will be removed in a later release.

304 13605 Will be removed in a later release.

304 13606 Will be removed in a later release.

304 13607 Will be removed in a later release.

304 13608 Will be removed in a later release.

304 13620 Will be removed in a later release.

305 13600 Will be removed in a later release.


TABLE ID FIELD ID COMMENTS

311 13600 Will be removed in a later release.

311 13601 Will be removed in a later release.

311 13602 Will be removed in a later release.

311 13603 Will be removed in a later release.

311 13604 Will be removed in a later release.

5107 13600 Will be removed in a later release.

5107 13601 Will be removed in a later release.

5107 13602 Will be removed in a later release.

5107 13605 Will be removed in a later release.

5107 13606 Will be removed in a later release.

5107 13607 Will be removed in a later release.

5107 13608 Will be removed in a later release.

5107 13620 Will be removed in a later release.

5108 13602 Will be removed in a later release.

5900 13600 Will be removed in a later release.

5900 13601 Will be removed in a later release.

5900 13604 Will be removed in a later release.

5900 13608 Will be removed in a later release.

5900 13620 Will be removed in a later release.

5902 13600 Will be removed in a later release.

5911 13600 Will be removed in a later release.

5911 13601 Will be removed in a later release.

5992 13600 Will be removed in a later release.

5992 13601 Will be removed in a later release.

5992 13602 Will be removed in a later release.


TABLE ID FIELD ID COMMENTS

5992 13604 Will be removed in a later release.

5992 13608 Will be removed in a later release.

5992 13620 Will be removed in a later release.

5993 13600 Will be removed in a later release.

5994 13600 Will be removed in a later release.

5994 13601 Will be removed in a later release.

5994 13602 Will be removed in a later release.

5994 13604 Will be removed in a later release.

5994 13608 Will be removed in a later release.

5994 13620 Will be removed in a later release.

5995 13600 Will be removed in a later release.

Fields no longer in use in Microsoft code in Microsoft Dynamics NAV


2018
A number of fields that are related to product groups are no longer in use, because the feature was replaced by
item categories in Microsoft Dynamics NAV 2017. The fields are marked as ObsoleteState:Pending.

TABLE ID FIELD ID COMMENTS

5723 All Deprecated. Do not use.

27 5704 Will be removed in a later release.

32 5707 Will be removed in a later release.

37 5712 Will be removed in a later release.

83 5707 Will be removed in a later release.

111 5712 Will be removed in a later release.

113 5712 Will be removed in a later release.

115 5712 Will be removed in a later release.

123 5712 Will be removed in a later release.

125 5712 Will be removed in a later release.


TABLE ID FIELD ID COMMENTS

246 5705 Will be removed in a later release.

753 5707 Will be removed in a later release.

5108 5712 Will be removed in a later release.

5110 5712 Will be removed in a later release.

5741 5712 Will be removed in a later release.

5745 5707 Will be removed in a later release.

5747 5707 Will be removed in a later release.

5902 5712 Will be removed in a later release.

5991 5712 Will be removed in a later release.

5993 5712 Will be removed in a later release.

6651 5712 Will be removed in a later release.

6661 5712 Will be removed in a later release.

For more information about the impact, see The new Item Categories feature replaced the Product Group
feature in Dynamics NAV 2017 on the Dynamics NAV team blog. For more information about item categories,
see How to: Categorize Items in the Dynamics 365 Business Central documentation.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Considerations for Upgrading Dynamics NAV
Deprecated Features in the UK Version
Deprecated Features in the Austrian Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Austria that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Blanket Order Archiving and Document Line Tracking


You can archive and delete blanket sales and purchase orders. You can view documents that are related to sales
order lines and purchase order lines, including from archived order lines. Related documents that you can track
include quotes, shipments, receipts, and blanket orders. This helps you to identify documents used to process
orders.

MOVED, REMOVED, OR REPLACED? WHY?

Moved Blanket Order Archiving and Document Line Tracking features


are no longer specific to Austria, so we have made them
generally available in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Austria Local Functionality in Dynamics NAV
Deprecated Features in the Australian Version of
Microsoft Dynamics NAV 2018
3/13/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Australia that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring the
simulation entries into real accounting entries.

MOVED, REMOVED, OR REPLACED? WHY?

Removed The Simulation Entries feature has been replaced with the
Posting Preview posting feature in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Deprecated Features in the Dutch Version of
Dynamics NAV
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for the Netherlands that has been removed from Dynamics
NAV, made available from a new page or report, made available to one or more additional countries, or replaced by
a new feature.

Checking Totals for Purchase Invoices and Purchase Credit Memos


If the total amount on a purchase document does not match the total amount from the purchase lines, you can find
out why by letting Dynamics NAV calculate the total amount, total base amount, total VAT amount, and total
amount including VAT for the purchase lines. The totals display in fields at the bottom of the Purchase Invoice or
Purchase Credit Memo pages.
By default, Dynamics NAV does not show these totals. To display them, on the Purchases & Payables Setup
page, choose the Show Totals on Purch. Inv./CM. check box.

NOTE
To use this feature, your purchase invoices or purchase credit memos must have at least one purchase line, and a quantity.
Additionally, when you turn on this feature Dynamics NAV recalculates totals on all purchase invoices and credit memos.
Depending on the number of documents, this can take some time.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The feature to check totals for purchase invoices and credit
memos is no longer specific to the Netherlands, so we have
made it generally available in the standard product.

See Also
Upgrading to Dynamics 365 Business Central
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Netherlands Local Functionality in Dynamics NAV
Deprecated Features in the Finnish Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Finland that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Multiple Interest Rates


When you create finance charge terms and reminder terms, for delayed payment penalty, you can specify multiple
interest rates so that the penalty fee is calculated from different interest rates in different periods.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The Multiple Interest Rates feature is no longer specific to


Finland, so we have made it generally available in the standard
product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Finland Local Functionality in Dynamics NAV
Deprecated Features in the French Version of
Microsoft Dynamics NAV 2018
4/16/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for France that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Simulation Entries
Before you post transactions, you can create simulation entries to preview the result of posting.

MOVED, REMOVED, OR REPLACED? WHY?

Replaced The Simulation Entries feature has been replaced with the
Posting Preview feature in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
France Local Functionality in Dynamics NAV
Deprecated Features in the German Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Germany that has been removed from Dynamics NAV,
made available from a new page or report, or replaced by a new feature.

Blanket Order Archiving and Document Line Tracking


You can archive and delete blanket sales and purchase orders. You can view documents that are related to sales
order lines and purchase order lines, including from archived order lines. Related documents that you can track
include quotes, shipments, receipts, and blanket orders. This helps you to identify documents used to process
orders.

MOVED, REMOVED, OR REPLACED? WHY?

Moved Blanket Order Archiving and Document Line Tracking features


are no longer specific to Germany, so we have made them
generally available in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Germany Local Functionality in Dynamics NAV
Deprecated Features in the Italian Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Italy that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Multiple Interest Rates


When you create finance charge terms and reminder terms, for delayed payment penalty, you can specify multiple
interest rates so that the penalty fee is calculated from different interest rates in different periods.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The Multiple Interest Rates feature is no longer specific to Italy,


so we have made it generally available in the standard
product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Italy Local Functionality in Dynamics NAV
Deprecated Features in the New Zealand Version of
Microsoft Dynamics NAV 2018
3/13/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for New Zealand that has been removed from Dynamics NAV,
made available from a new page or report, or replaced by a new feature.

Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring the
simulation entries into real accounting entries.

MOVED, REMOVED, OR REPLACED? WHY?

Removed The Simulation Entries feature has been replaced with the
Posting Preview posting feature in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Deprecated Features in the Norwegian Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Norway that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Multiple Interest Rates


When you create finance charge terms and reminder terms, for delayed payment penalty, you can specify multiple
interest rates so that the penalty fee is calculated from different interest rates in different periods.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The Multiple Interest Rates feature is no longer specific to


Norway, so we have made it generally available in the
standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Norway Local Functionality in Dynamics NAV
Deprecated Features in the Spanish Version of
Microsoft Dynamics NAV 2018
3/13/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Spain that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

G/L Account Equivalency Tool


The G/L Account Equivalency tool that was used for one-time conversion of an existing chart of accounts to a
new one has been removed.

MOVED, REMOVED, OR REPLACED? WHY?

Removed The G/L Account Equivalency tool that was used for one-
time conversion of an existing chart of accounts to a new one
has been removed.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Spain Local Functionality in Dynamics NAV
Deprecated Features in the Swedish Version of
Microsoft Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Sweden that has been removed from Dynamics NAV, made
available from a new page or report, or replaced by a new feature.

Multiple Interest Rates


When you create finance charge terms and reminder terms, for delayed payment penalty, you can specify multiple
interest rates so that the penalty fee is calculated from different interest rates in different periods.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The Multiple Interest Rates feature is no longer specific to


Sweden, so we have made it generally available in the
standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Sweden Local Functionality in Dynamics NAV
Deprecated Features in the Swiss Version of Microsoft
Dynamics NAV 2018
1/2/2018 • 1 min to read • Edit Online

This topic lists and describes the local functionality for Switzerland that has been removed from Dynamics NAV,
made available from a new page or report, or replaced by a new feature.

Blanket Order Archiving and Document Line Tracking


You can archive and delete blanket sales and purchase orders. You can view documents that are related to sales
order lines and purchase order lines, including from archived order lines. Related documents that you can track
include quotes, shipments, receipts, and blanket orders. This helps you to identify documents used to process
orders.

MOVED, REMOVED, OR REPLACED? WHY?

Moved Blanket Order Archiving and Document Line Tracking features


are no longer specific to Switzerland, so we have made them
generally available in the standard product.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Switzerland Local Functionality in Dynamics NAV
Deprecated Features in the UK Version of Microsoft
Dynamics NAV 2018
1/2/2018 • 4 min to read • Edit Online

This topic lists and describes the local functionality for the United Kingdom that has been removed from
Dynamics NAV, made available from a new page or report, or replaced by a new feature.

Accounting periods and system calendar


If your fiscal year is different than the calendar, you can measure your fiscal period in other units of time, such as
months or quarters. To do this, you set up system calendars and accounting periods.

MOVED, REMOVED, OR REPLACED? WHY?

Removed Lack of use. Additionally, there are standard features for


accounting periods that provide most of the same
functionality as the UK accounting periods.

Create and export a Bankers' Automated Clearing Service file


You can use Bankers' Automated Clearing Service (BACS ) to process financial transactions electronically. To do so,
you must export vendor payments to a BACS file using the Export BACS option.

MOVED, REMOVED, OR REPLACED? WHY?

Removed This banking format standard is no longer used. This


functionality is now covered by extensions such as the
Envestnet Yodlee Bank Feeds, AMC Banking, and various
other formats.

Non-invoiced stock reports


For month-end reconciliation and auditing, you can use the Stock Received Not Invoiced report to view stock
that is received but not yet invoiced, and the Stock Shipped Not Invoiced report to see stock that has been
shipped but not yet invoiced.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The functionality for the Shipped, Non-Invoiced Sales Orders


and the Received, Not Invoiced Purchase Order reports are no
longer specific to the UK, so we have made them generally
available as views for sales orders and purchase orders. The
views are available in the Navigation Pane as Shipped Not
Invoiced and Shipped Not Received options under Sales
Orders and Purchase Orders, respectively.

Print Unposted Sales and Unposted Purchase reports


The Unposted Sales and Unposted Purchase reports let you print a list of sales and purchase documents that are
not yet posted.
MOVED, REMOVED, OR REPLACED? WHY?

Moved The Unposted Sales and Unposted Purchase reports are now
available from the Navigation Pane as views under Sales
Orders and Purchase Orders.

Other VAT reports


You can use the following reports for VAT reporting:
Day Book VAT Entry - Displays the daily total for VAT entries for a specific period.
Day Book Cust. Ledger Entry - Displays the daily total for customer ledger entries for a specific period.
Day Book Vendor Ledger Entry - Displays the daily total for vendor ledger entries for a specific period.

MOVED, REMOVED, OR REPLACED? WHY?

Moved These VAT-related reports are no longer specific to the UK, so


we have made them generally available in the standard
product.

Specify the supply type on documents


You can specify supply types such as sales, loan, exchange, hire, lease, rental, sales on commission, on tax invoices.
To do this, you must update the codes and names of the supply types in the Types of Supply window.

MOVED, REMOVED, OR REPLACED? WHY?

Removed Lack of use. The business need that this functionality was
introduced to cover is no longer relevant.

Multiple Interest Rates


When you create finance charge terms and reminder terms, for delayed payment penalty, you can specify multiple
interest rates so that the penalty fee is calculated from different interest rates in different periods.

MOVED, REMOVED, OR REPLACED? WHY?

Moved The Multiple Interest Rates feature is no longer specific to the


UK, so we have made it generally available in the standard
product.

Objects and Fields that are deleted in Microsoft Dynamics NAV 2018
Table 10505 has been deleted. The following list shows additional fields that are deleted as a result of the features
that have been removed.

TABLE ID FIELD ID COMMENTS

23 10550 Deleted.

81 10550 Deleted.

81 10551 Deleted.
TABLE ID FIELD ID COMMENTS

81 10552 Deleted.

81 10553 Deleted.

271 10550 Deleted.

312 10550 Deleted.

312 10551 Deleted.

334 10505 Deleted.

363 10550 Deleted.

7118 10505 Deleted.

7152 10550 Deleted.

See Also
Upgrading to Microsoft Dynamics NAV 2018
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
United Kingdom Local Functionality in Dynamics NAV
Converting a Database - Technical Upgrade
5/22/2018 • 8 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
This article describes how to convert a Dynamics NAV database from one of the following versions to Microsoft
Dynamics NAV 2018:
Microsoft Dynamics NAV 2013
Microsoft Dynamics NAV 2013 R2
Microsoft Dynamics NAV 2015
Microsoft Dynamics NAV 2016
Microsoft Dynamics NAV 2017
Microsoft Dynamics NAV 2018 (cumulative update)

About database conversion


Converting a database, which is often referred to as a technical upgrade, changes the database so that it works on
the latest Microsoft Dynamics NAV 2018 platform. The conversion updates the system tables of the old database
to the new schema (data structure), and upgrades of all reports to support Report Viewer 2015. It provides you
with the latest platform features and performance enhancements.

Task 1: Preparing the Old Database


To convert the old database to a Microsoft Dynamics NAV 2018 database, the first task is to back up the old
database and then prepare to convert it.

NOTE
Do not perform this task if you are converting the database from one cumulative update of Microsoft Dynamics NAV 2018
to the next cumulative update. In this case, you only have to complete task 2.

To prepare the old database


1. Make a copy of the old database or create full database backup.
For more information, see Create a Full Database Backup (SQL Server).
2. Open the development environment that matches the Dynamics NAV version of the old database, and then
connect to the old database.
For more information, see How to: Open Databases.
3. In Object Designer, verify that all objects are compiled and no objects are locked.
For more information about compiling objects, see Compiling Objects.
If one or more objects are locked, the conversion process cannot update the database version number. As a
result, the conversion does not complete. For more information, see Locking and Unlocking Objects.
4. On the Tools menu, choose Build Server Application Objects, and then choose the Yes button.
5. If any errors occur, they are shown in the Error List window. Make sure that you address all compilation
errors before you continue.
6. Upload the Microsoft Dynamics NAV 2018 Partner license to the database.
For more information, see Uploading a License File for a Specific Database.

IMPORTANT
The license that you upload must be a developer license. During the conversion, the development environment will
convert the report objects that are stored in the old database to the RDL format.

7. Run the schema synchronization with validation to synchronize the database schema changes.
For more information, see How to: Synchronize the Tenant Database with the Application Database.
8. Stop the Microsoft Dynamics NAV Server instance, and close the development environment.
You can use the Microsoft Dynamics NAV Server Administration tool or Set-NAVServerInstance cmdlet of
the Microsoft Dynamics NAV Administration Shell.
For information about the Microsoft Dynamics NAV Server Administration tool, see How to: Start, Stop,
Restart, or Remove a Dynamics NAV Server Instance.
To use the Set-NAVServerInstance cmdlet, run the following command:

Set-NAVServerInstance –ServerInstance <ServerInstanceName> -Stop

9. Clear all records from the dbo.Server Instance and dbo.Debugger Breakpoint tables in the old database
in SQL Server.
Using SQL Server Management Studio, open and clear the dbo.Server Instance and dbo.Debugger
Breakpoint tables of the old database. For example, you can run the following SQL query:

DELETE FROM [<My NAV Database Name>].[dbo].[Server Instance]


DELETE from [<My NAV Database Name>].[dbo].[Debugger Breakpoint]

10. (Optional) Before you start the following procedure, you can uninstall the old version of Dynamics NAV.
When you uninstall Dynamics NAV, the database is still attached to the instance of SQL Server, which you
can verify using SQL Server Management Studio.

Task 2: Converting the Old Database


Next, you will convert the old database so that it can be used with Microsoft Dynamics NAV 2018.

TIP
If you want to write a script that helps you convert databases, you can use the Invoke-NAVDatabaseConversion function in
the Microsoft Dynamics NAV Development Shell.

To convert the database


1. If the database is on Azure SQL Database, add your user account to the dbmanager database role on the
master database.
This membership is only required for converting the database, and can be removed afterwards.
2. Install Microsoft Dynamics NAV 2018.
Run the Microsoft Dynamics NAV 2018 Setup, and choose to install the Developer option.
3. Run the Microsoft Dynamics NAV 2018 development environment as an administrator.
If the development environment is already connected to the old database, a dialog box about
converting the database appears. Go to the next step.
Otherwise, connect to the old database that you prepared in the previous task, and then go to the
next step.
For more information, see How to: Open Databases.
4. In the dialog box that appears, read the instructions about converting the database carefully because this
action cannot be reversed. When you are ready, choose the OK button, and then choose the OK button to
confirm that you want to convert the database.
Dynamics NAV will now convert the database. This includes an upgrade of system tables and reports.
5. When you are notified that the conversion was successful, choose the OK button.
6. If the database references any assemblies (such as client control add-ins) that are not included on the
Microsoft Dynamics NAV 2018 installation media (DVD ), then add the assemblies to the Add-ins folder on
Microsoft Dynamics NAV Server or Microsoft Dynamics NAV Windows client computers.
For the Microsoft Dynamics NAV Windows client, the default path is C:\Program Files (x86)\Microsoft
Dynamics NAV\100\RoleTailored Client\Add-ins folder.
For Microsoft Dynamics NAV Server, the default path is the C:\Program Files\Microsoft Dynamics
NAV\110\Service\Add-ins folder.
7. Compile all objects without table schema synchronizing (Synchronize Schema set to Later); you will do
this later.
For more information, see Compiling Objects.
8. Fix compilation errors.
If any errors occur, they are shown in the Error List window. For help on resolving the errors, see the
following:
Resolving Compilation Errors When Converting a Dynamics NAV 2013 Database.
Resolving Compilation Errors When Converting a Dynamics NAV 2015 Database.
Resolving Compilation Errors When Converting a Dynamics NAV 2016 Database.
Resolving Compilation Errors When Converting a Dynamics NAV 2017 Database.
You can find all objects which did not compile in the Object Designer window, by setting a field filter
on the Compiled field.
9. Connect a Microsoft Dynamics NAV 2018 Server instance to the converted database.
Use the Microsoft Dynamics NAV Server Administration tool or the Set-NAVServerConfiguration cmdlet
to connect a Microsoft Dynamics NAV Server instance to the converted database.

IMPORTANT
The service account that is used by the Microsoft Dynamics NAV Server instance must be a member of the
db_owner role in the Dynamics NAV database on SQL Server or Azure SQL Database.

For more information, see How to: Connect a Microsoft Dynamics NAV Server Instance to a Database and
Giving the account necessary database privileges in SQL Server.
10. Go to the development environment, and set it to use the Microsoft Dynamics NAV Server instance that
connects to the database.
For more information, see How to: Change the Microsoft Dynamics NAV Server Instance or Database
Information.
11. Recompile published extensions.
Use the Repair-NAVApp cmdlet of the Microsoft Dynamics NAV 2018 Administration Shell to compile the
published extensions to make sure they are work with the new platform.
For example, you can run the following command to recompile all extensions:

Get-NAVAppInfo -ServerInstance <ServerInstanceName> | Repair-NAVApp

12. Run the schema synchronization with validation to complete the database conversion.
For more information, see How to: Synchronize the Tenant Database with the Application Database.
13. If you converted a Microsoft Dynamics NAV 2016, you will have to modify C/AL code to ensure that the
My Settings page works properly in the Microsoft Dynamics NAV Web client. For more information, see
Resolving My Settings Page Implementation After a Database Conversion.
14. Upload the customer license to the converted database.
For more information, see Uploading a License File for a Specific Database.
You have now completed the conversion of the database to be accessed from Microsoft Dynamics NAV
2018. To test the converted database, you can connect it to the Microsoft Dynamics NAV 2018 Server
instance that is used by Dynamics NAV clients, and then open a client.

Database and Windows collations


Starting from SQL Server 2008, SQL Server collations are fully aligned with the collations in Windows Server. If
you upgrade to Microsoft Dynamics NAV 2018 from Microsoft Dynamics NAV 2009, the step to convert the
database includes upgrading the database from using SQL collations to using Windows collation. This collation
change provides users with the most up-to-date and linguistically accurate cultural sorting conventions. For more
information, see Collation and Unicode Support.

See Also
Upgrading the Application Code
Upgrading the Data
Upgrading to Microsoft Dynamics NAV 2017
Automating the Upgrade Process using Sample Windows PowerShell Scripts
Upgrading the Application Code in Dynamics NAV
5/22/2018 • 12 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
Typically, customers want all the customizations that have been implemented in their existing Dynamics NAV
databases to be migrated to their new Microsoft Dynamics NAV 2018 databases. Depending on the version
of Dynamics NAV that a database is being upgraded from, the amount of code changes between the two
versions can vary. To upgrade the application code, you must merge code from different versions of the
application. This merge process is known as a code upgrade or application upgrade. You must upgrade the
application before you upgrade the data.

Application Upgrade Overview


During an upgrade, you have to first identify which changes you have to make, and then you'll have to
upgrade the application objects and the application code, and finally, you might have to upgrade data so that
it fits the new database schema.
For the application portion of the upgrade, you must analyze and process code changes by comparing and
merging three separate versions of the Dynamics NAV database:

VERSION DESCRIPTION

Original version This is the baseline version of the solution that you want to
upgrade, such as the original release of Microsoft Dynamics
NAV 2016 or Microsoft Dynamics NAV 2017.

Modified version This is the version that you want to upgrade, such as a
customer's Microsoft Dynamics NAV 2016 or Microsoft
Dynamics NAV 2017 database with customizations and
add-on solutions.

Target version This is the target of the merge process that you want to
upgrade your application to, such as the standard version
of the Microsoft Dynamics NAV 2018 database.

When you merge the application objects from these three versions, you can import the result into a new
Microsoft Dynamics NAV 2018 database that then contains the upgraded application. At the end of the
process, you export the merged Microsoft Dynamics NAV 2018 objects from this database to a .fob file that
you will use during the data upgrade.
Different ways of upgrading application code
You can use any tool or set of tools to help you compare and merge code. Dynamics NAV includes Windows
PowerShell cmdlets and sample scripts that can help you upgrade your application. The cmdlets are available
through the Microsoft Dynamics NAV Development Shell, or by importing the
Microsoft.Dynamics.NAV.Model.Tools.psd1 module into the Windows PowerShell Integrated Scripting
Environment (ISE ). You can find the sample scripts on the product installation media, in the
WindowsPowerShellScripts\ApplicationMergeUtilities folder. We recommend that you use these cmdlets and
sample scripts because they can make it faster to merge most changes. For example, you can combine
several steps in a command that uses a cmdlet such as the Merge-NAVApplicationObject. The sections in this
article describe how you can use the Merge-NAVApplicationObject cmdlet and other Windows PowerShell
cmdlets. For more information, see Comparing and Merging Application Object Source Files.

Task 1: Install the Prerequisites


To complete the tasks in this article, you will use various tools and components of the old Dynamics NAV
version and Microsoft Dynamics NAV 2018. Ensure that you have the following installed:

TOOL/COMPONENT

Old Dynamics NAV version Microsoft Dynamics NAV Development


Environment
or
Dynamics NAV Development Shell
This is not available in Microsoft Dynamics NAV
2013 and Microsoft Dynamics NAV 2013 R2

Microsoft Dynamics NAV 2018 Microsoft Dynamics NAV Server


Microsoft Dynamics NAV Development Shell
Microsoft Dynamics NAV Administration Shell
Microsoft Dynamics NAV Development Environment

Task 2: Prepare the Application Object Text Files


You must prepare text files that contain the application objects for the different application versions
previously described (original, modified, and target). The text files provide the input for the application merge
process.
There are three ways to export application objects to text files:
Use the Microsoft Dynamics NAV Development Environment version that matches the application
database version. For more information see To export objects by using the development environment UI.
Use the finsql.exe to run the ExportObjects command. For more information, see To export objects by
running finsql.exe with the ExportObjects command .
Use the Microsoft Dynamics NAV Development Shell version that matches the application database
version. This is the way that is described in the tasks of this article. Note that the Microsoft Dynamics NAV
Development Shell is not available for Microsoft Dynamics NAV 2013 and Microsoft Dynamics NAV
2013 R2. For these versions, you must use development environment or finsql.exe.
Create the application text files
1. Create four folders on the computer, and name them as follows:
ORIGINAL
This folder will be used to store the application object text file(s) from the baseline version, such
as the original release of Microsoft Dynamics NAV 2016 or Microsoft Dynamics NAV 2017.
MODIFIED
This folder will be used to store the application object text file(s) from the modified version,
such as the customer's database.
TARGET
This folder will be used to store the application object text file(s) from Microsoft Dynamics NAV
2018.
RESULT
This folder will be used to store the application object text file(s) that are the result of the
application merge. It will also contain zero or more .CONFLICT files that describe conflicting
code.
2. Export all application objects from the original version of the old database, such as the original
Microsoft Dynamics NAV 2017 database. Do not export system tables, which have the IDs in the
2000000000 range. Name the file OldBaseVersion.txt, and then save the file in the ORIGINAL
folder that you created earlier.
For example, start the Microsoft Dynamics NAV Development Shell version that matches the
database version, and run the Export-NAVApplicationObject function as follows:

Export-NAVApplicationObject –DatabaseServer MyServer –DatabaseName "Demo Database NAV (10-0)" –


Path C:\Upgrade\ORIGINAL\OldBaseVersion.txt -Filter 'Id=1..1999999999'

3. Export all application objects, except system tables, from the old modified version, such as the
customer's customized Microsoft Dynamics NAV 2017 database. Name the file
OldCustomVersion.txt, and then save the file in the MODIFIED* folder that you created earlier.
For example (using the Microsoft Dynamics NAV Development Shell version that matches the
database version), if the customer's database is called MyCustomerNAV2016Database, you can run
the following command:

Export-NAVApplicationObject –DatabaseServer MyServer –DatabaseName "MyCustomerNAV2017Database" –


Path C:\Upgrade\MODIFIED\OldCUSTOMVersion.txt -Filter 'Id=1..1999999999'

TIP
In some cases, existing customizations might be irrelevant after the upgrade because they correspond to new
functionality in Microsoft Dynamics NAV 2018.

4. Export all application objects, except system tables, from the new base version, such as the original
Microsoft Dynamics NAV 2018 database. Name the file NewBaseVersion.txt, and then save the file
in the TARGET folder that you created earlier.
For example, using the Microsoft Dynamics NAV Development Shell for Microsoft Dynamics NAV
2018, run the following command:

Export-NAVApplicationObject –DatabaseServer MyServer –DatabaseName "Demo Database NAV (11-0)" –


Path C:\Upgrade\Target\NewBaseVersion.txt -Filter 'Id=1..1999999999'

Optionally, you can use the Split-NAVApplicationObjectFile cmdlet to split each text file into separate text
files for each application object. This can make it easier to keep track of the process. The end result at this
stage is three folders with one or more text files that contain the three sets of application objects that you
want to merge.

Task 3: Merge Versions


You must now merge the three sets of application objects to create the application for the new database. This
section illustrates how to do this by using the Merge-NAVApplicationObject cmdlet. Additionally, the
Dynamics NAV product media contains sample scripts provide examples of how you can use the Merge-
NAVApplicationObject cmdlet to merge application objects. For more information, see How to: Merge
Application Changes.

NOTE
In certain scenarios, you can choose to use the Compare-NAVApplicationObject cmdlet to identify the changes
between the existing customized application and the new application. You can then choose to use the Update-
NAVApplicationObject cmdlet to apply all or some of the changes to the new version. For more information, see How
to: Compare and Update Application Object Source Files. However, we recommend that you use the Merge-
NAVApplicationObject cmdlet in most cases.

Merge the application object versions into text files


1. Run the Microsoft Dynamics NAV Development Shell for Microsoft Dynamics NAV 2018 as an
administrator.
2. At the command prompt, change to the directory that contains the four folders that contain the
application text files, and then run the following command:

Merge-NAVApplicationObject -OriginalPath C:\Upgrade\ORIGINAL -TargetPath C:\Upgrade\TARGET -


ModifiedPath C:\Upgrade\MODIFIED -ResultPath C:\Upgrade\RESULT

Depending on the number of objects that you are merging and the number of differences found, this can take
a few seconds, a few minutes, or longer. When the cmdlet completes, the result of the merge is shown,
including a description of any application objects with conflicting code. The RESULT folder will contain a text
file (.TXT) for each merged application object and possibly one or more .CONFLICT files that describe the
code conflicts that occurred during the merge.
At this point, you can either go to Task 4 to analyze and eventually resolve the conflicts, or you can go directly
to Task 5 to import the merged objects as-is from the RESULT folder to the new Microsoft Dynamics NAV
2018 database.

Task 4: Handling Conflicts


Depending on the application that you are upgrading, you can choose to analyze and fix the conflicting code
before you import the merged objects into the development environment. The conflicts are shown in the
merged text files but are also identified in .CONFLICT files in the subfolders of the RESULT folder. The
subfolders ConflictOriginal, ConflictModified, and ConflictTarget folders then contain copies of the
source files from the versions that have conflicting code.
You can analyze the conflicts in any tool, make the relevant changes, and then run the merge operation again.
For more information, see Handling Merge Conflicts. Alternatively, you can go directly to task 5 to import the
merged files into the Microsoft Dynamics NAV 2018 development environment, and resolve the conflicts
there.

NOTE
We recommend that you use development environment to resolve conflicts because this will ensure that the proper
code page (text encoding) is used for text strings like captions. If you use another tool, such as Notepad or Visual
Studio Code, make sure that the proper text encoding is used.

Task 5: Import and Compile Merged Objects in an Empty Database


After you have completed the merge, you import the new merged application objects as text files into a new
(empty) database, and then compile all objects. You must resolve any compilation errors before you can
continue. The text files include successfully merged code, and code that is partially merged. You can import
the partially merged objects into the Microsoft Dynamics NAV 2018 development environment and resolve
the conflicts there.
1. Create a new Microsoft Dynamics NAV 2018 database for the new upgraded application. The
database should be empty, except for the system tables.
For example, give the database the name My Upgraded App. For more information, see How to:
Create Databases.
2. Make sure the database includes a valid Microsoft Dynamics NAV 2018 license.
For more information, see How to: Upload the License File
3. Import the new merged application object text files (.TXT) from the Result folder into the new
database.
There are three ways to import the files:
Use the Microsoft Dynamics NAV 2018 development environment.
For more information see To import objects by using the development environment UI.
Use the finsql.exe to run the ImportObjects command.
For more information, see To import objects by running finsql.exe with the ImportObjects
command .
Use the Microsoft Dynamics NAV Development Shell (or
Microsoft.Dynamics.NAV.Model.Tools.psd1 module).
The shell includes the Join-NAVApplicationObjectFile cmdlet and Import-
NAVApplicationObject function. The Join-NAVApplicationObjectFile cmdlet combines
multiple application object text files into one text file. The Import-NAVApplicationObject
function runs the ImportObjects command to import an object file.
This means that you can run a command similar to following to create a single text file from the
merge application text files in the Result folder:

Join-NAVApplicationObjectFile –Source C:\Upgrade\RESULT\*.txt -Destination C:\Upgrade\all-


merged.txt

Then, you can run this command to import the text file:

Import-NAVApplicationObject –DatabaseServer MyServer –DatabaseName "My Upgraded App" –Path


C:\Upgrade\all-merged.txt

4. Connect a Microsoft Dynamics NAV 2018 Server instance to the database.


You can do this with the Microsoft Dynamics NAV Server Administration tool or the Set-
NAVServerConfiguration cmdlet in the Microsoft Dynamics NAV Administration Shell. In addition,
you must add the service account that is used by the Microsoft Dynamics NAV Server instance as a
member of the db_owner role in the Dynamics NAV database on SQL Server.
For more information about how to do this using the Microsoft Dynamics NAV Server Administration
tool, see How to: Connect a Microsoft Dynamics NAV Server Instance to a Database and Giving the
account necessary database privileges in SQL Server.
5. Compile all the newly imported objects. To save time, it is recommended that you choose to run
schema synchronization later when compiling the objects.
You can use the development environment or finsql.exe. For more information, see Compiling Objects.
If you use the development environment, you will first have to set it to use the Microsoft Dynamics
NAV Server instance that connects to the database. For more information, see How to: Change the
Microsoft Dynamics NAV Server Instance or Database Information.
When you compile the objects, an error is thrown for each code conflict, and you can use the tools that
are available in the development environment to resolve the conflicts.
6. If not already done, run schema synchronization. For more information, see How to: Synchronize the
Tenant Database with the Application Database.
You now have a new database with a fully upgraded application.

Task 6: Export All Objects


Now, you must export all objects of the new database to an objects.fob file so that you can import them
when performing the data upgrade. The export must include customized objects, upgraded reports, and all
other Microsoft Dynamics NAV 2018 objects.
As with exporting objects in Task 1, you can use either the Microsoft Dynamics NAV 2018 development
environment, finsql.exe, or Microsoft Dynamics NAV Development Shell.
With the Microsoft Dynamics NAV Development Shell, you can run a command that is similar to the
following:

Export-NAVApplicationObject objects.fob -DatabaseName "My Upgraded App" -DatabaseServer [server_name]\


[database_instance]

This completes the upgrade of the application code. Next, you must upgrade the data in the database. For
more information, see Upgrading the Data.

See Also
Upgrading the Data
Upgrading to Microsoft Dynamics NAV 2018
How to: Create Databases.md
Deprecated Features in the UK Version of Microsoft Dynamics NAV 2018
Upgrading the Data to Microsoft Dynamics NAV
2018
5/22/2018 • 20 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
This topic describes the tasks required for upgrading the following database versions to Microsoft Dynamics
NAV 2018:
Microsoft Dynamics NAV 2013
Microsoft Dynamics NAV 2013 R2
Microsoft Dynamics NAV 2015
Microsoft Dynamics NAV 2016
Microsoft Dynamics NAV 2017
You use data conversion tools provided with Microsoft Dynamics NAV 2018 to convert the old data with the old
version’s table and field structure, so that it functions together with the new version’s table and field structure.
Mainly, only table objects and table data are modified during the data upgrade process. Other objects, such as
pages, reports, codeunits, and XMLports are upgraded as part of the application code upgrade process.
The data upgrade process described in this article leads you through the database conversion (technical
upgrade) and then the upgrade of the actual data, which is achieved by using the upgrade toolkit/upgrade
codeunits.

Prerequisites
Before you start the upgrade tasks, make sure you meet the following prerequisites:
1. Your computer uses the same codepage as the data that will be upgraded.
If you use conflicting codepages, some characters will not display in captions, and you might not be able
to access the upgraded database. This is because Dynamics NAV must remove incorrect metadata
characters to complete the data upgrade. In this case, after upgrade, you must open the database in the
development environment on a computer with the relevant codepage and compile all objects. This adds
the missing characters again.
Optionally, you can export the captions before the upgrade. For more information, see How to: Add
Translated Strings for Conflicting Text Encoding Formats.
2. You have a FOB file(s) that contains the upgraded application code and upgrade toolkit. The upgrade
toolkit includes upgrade codeunits for handling the data upgrade. The upgrade toolkit can be in the same
FOB file as the application code or in a separate FOB file.
For more information about upgrading the application code, see Upgrading the Application Code.
For W1 versions, you can find the default upgrade toolkit objects in the UpgradeToolKit\Data
Conversion Tools folder on the Microsoft Dynamics NAV 2018 installation media (DVD ). Choose the
FOB that matches the Dynamics NAV version from which you are upgrading:
VERSION FOB REMARKS

Microsoft Dynamics NAV 2013 Upgrade7001100.FOB This file can be found on the
Microsoft Dynamics NAV 2018
Cumulative Update 2 installation
media (DVD). It is not available with
later cumulative updates.

Microsoft Dynamics NAV 2013 R2 Upgrade7101100.FOB and This file can be found on the
Upgrade710HF1100.FOB Microsoft Dynamics NAV 2018
Cumulative Update 2 installation
media (DVD). It is not available with
later cumulative updates.

Microsoft Dynamics NAV 2015 Upgrade8001100.FOB

Microsoft Dynamics NAV 2016 Upgrade9001100.FOB

Microsoft Dynamics NAV 2017 Upgrade10001100.FOB

For local versions, you will find the upgrade toolkit objects in the UpgradeToolKit\Local Objects folder.
The files follow the same naming convention except they include the 2-letter local version, such as
Upgrade10001100.DK.fob for Denmark or Upgrade10001100.DE.fob for Germany.
3. You have exported the permission sets (except SUPER ) and permissions as XML files.
To exclude the SUPER permission set when running XMLPort 9171, add the filter Role ID is <>SUPER .
For more information, see How to: Export and Import Permission Sets and Permissions.
4. (Optional) Make a copy of the web.config file for all Dynamics NAV Web Server instances for the
Microsoft Dynamics NAV Web client. With Microsoft Dynamics NAV 2018, Dynamics NAV Web Server
instances run on Microsoft .NET Core. With this change, the instances now use a .json type file (called
navsettings.json) instead of the web.config file.
5. (Optional) If the old Dynamics NAV application uses data encryption, you exported the encryption key
file that it used for the data encryption.
For more information, see How to: Export and Import Encryption Keys.

NOTE
If the old Dynamics NAV application uses Payment Services for Microsoft Dynamics ERP, be aware that this was
discontinued in Microsoft Dynamics NAV 2017. This means that most of the objects that are associated with this feature
will be deleted during the upgrade. Some objects you will have to manually delete.

Task 1: Prepare the old database


1. Use the Microsoft Dynamics NAV Development Environment that matches the old database to build all
application objects.
For more information, see How to: Build Server Application Objects.
2. Unlock all application objects.
For more information, see How to: Unlock an Object.
3. Synchronize the database schema by using the development environment or Dynamics NAV
Administration Shell that matches the old database.
For more information, see How to: Synchronize the Tenant Database with the Application Database.

Task 2: Create a full SQL backup of the old database on SQL Server
You must create a full backup of the old database in the SQL Server. Alternatively, you can make a copy of the
old database and perform the upgrade tasks on the copy.
For more information, see Create a Full Database Backup (SQL Server).

Task 3 Uninstall all V1 extensions in old database


Open the Microsoft Dynamics NAV Administration Shell that matches to old database, and run these
commands:
1. To get a list of the V1 extensions that are installed, run this command:

Get-NAVAppInfo -ServerInstance <ServerInstanceName> -Tenant <TenantID> |ft

Replace <ServerInstanceName> with the name of the Microsoft Dynamics NAV Server instance that the
database connects to. Replace <TenantID> with the tenant ID of the database. If you do not have a
multitenant server instance, use default .
Make a note of the V1 extensions that you will uninstall because you will reinstall these later, after you
upgrade the database.
2. For each Extension V1, run this command to uninstall it:

Uninstall-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

Replace <Name> and <N.N.N.N> with the name and version of the Extension V1 as it appeared in the
previous step.

Task 4: Upload the Microsoft Dynamics NAV 2018 license to the old
database
By using the Microsoft Dynamics NAV Development Environment that matches the old database, upload the
Microsoft Dynamics NAV 2018 license to the database.
For more information, see Uploading a License File for a Specific Database.

Task 5: Delete all objects except tables from the old database
In the development environment version that matches the database, open the old database, open Object
Designer, select all objects except tables, and then choose Delete.
You can also use the DeleteObjects command of the finsql.exe.

Task 6: Uninstall (optional) the old product and install the new product
Uninstall the old Dynamics NAV, and then install Microsoft Dynamics NAV 2018.
As a minimum, you must install the following Microsoft Dynamics NAV 2018 components: Client (with the
Development Environment), Modern Development Environment, Administration Tools, Server, and SQL Server
Components. You can install these components by choosing the Custom option during Setup. For more
information, see Custom Option.

Task 7: Clear Dynamics NAV Server instance and debugger breakpoint


records from old database
Clear all records from the dbo.Server Instance and dbo.Debugger Breakpoint tables in the database in SQL
Server.
1. If you did not uninstall the old Dynamics NAV, make sure that you stop the old Microsoft Dynamics NAV
Server instance, and close any tools that connect to the database, such as the Dynamics NAV Administration
Tool and development environment.
2. Using SQL Server Management Studio, open and clear the dbo.Server Instance and dbo.Debugger
Breakpoint tables of the old database. For example, you can run the following SQL query:

DELETE FROM [<My NAV Database Name>].[dbo].[Server Instance]


DELETE from [<My NAV Database Name>].[dbo].[Debugger Breakpoint]

Task 8: Convert the old database to the Microsoft Dynamics NAV


2018 format
If the database is on Azure SQL Database, you must first add your user account to the dbmanager database
role on master database. This membership is only required for converting the database, and can be removed
afterwards.
To convert the old database to the Microsoft Dynamics NAV 2018 format, open the old database in the
Microsoft Dynamics NAV 2018 development environment, and follow the conversion instructions.

IMPORTANT
Do not run schema synchronization at this time.

Task 9: Import the upgraded application objects and upgrade toolkit


objects into the converted database
Using the Microsoft Dynamics NAV 2018 development environment, import the application objects that you
want in the Microsoft Dynamics NAV 2018 database. This includes the application objects FOB file (from the
application code upgrade) and the upgrade toolkit objects FOB file.
1. Import the application objects FOB file first, and then import the upgrade toolkit FOB file.
For more information, see How to: Import Objects.
2. When you import the FOB file, if you experience metadata conflicts, the Import Worksheet windows
appears.
Review the Worksheet page. For more information, see Import Worksheet.
Choose Replace All, and then OK to continue.
3. IMPORTANT When prompted about table synchronization, set the Synchronize Schema option to
Later.
Task 10: Connect a Microsoft Dynamics NAV 2018 Server instance to
the converted database
You use the Microsoft Dynamics NAV Server Administration tool for Microsoft Dynamics NAV 2018 or Set-
NAVServerConfiguration cmdlet in the Microsoft Dynamics NAV Administration Shell to connect a Microsoft
Dynamics NAV Server instance to the converted database.
The service account that is used by the Microsoft Dynamics NAV Server instance must be a member of the
db_owner role in the Dynamics NAV database on SQL Server or Azure SQL Database.

IMPORTANT
When upgrading a large database, you should increase the SQL Command Timeout setting for the Microsoft Dynamics
NAV Server instance, to avoid timeouts during schema synchronization. The default setting is 30 minutes.

For more information, see How to: Connect a Microsoft Dynamics NAV Server Instance to a Database and
Giving the account necessary database privileges in SQL Server.

Task 11: Compile all objects that are not already compiled
1. In the development environment, set it to use the Microsoft Dynamics NAV Server instance that connects
to the database.
For more information, see How to: Change the Microsoft Dynamics NAV Server Instance or Database
Information.
2. Use the development environment or finsql.exe to compile all objects that are not already compiled. This
includes the imported application objects, data tables, and system tables.

IMPORTANT
Choose to run schema synchronization later. For example, in Object Designer, choose Tools, choose Compile, set
the Synchronize Schema option to Later, and then choose OK. For more information, see Compiling Objects.

3. (Microsoft Dynamics NAV 2016 and earlier only) If you get errors on the following table objects, use the
Object Designer to delete the objects because they are no longer used.
Table 470 Job Queue (replaced by the Task Scheduler)
Table 824 DO Payment Connection Details
Table 825 DO Payment Connection Setup
Table 827 DO Payment Credit Card
Table 828 DO Payment Credit Card Number
Table 829 DO Payment Trans. Log Entry
Table 1510 Notification Template

When you delete a table object, in the **Delete** confirmation dialog box that appears, set the
**Synchronize Schema** option to **Force**.

> [!IMPORTANT]
> In this step, it is very important that you do not use the **Sync. Schema For All Tables** option from the
**Tools** menu.

1. (Microsoft Dynamics NAV 2016 and earlier only) If the old database includes test runner codeunits, you
will get errors on these codeunits that the OnBeforeTestRun and OnAfterTestRun trigger signatures are
not valid. To fix these issues, you change the signature of the OnBeforeTestRun and OnAfterTestRun
triggers to include the TestPermission parameter.
For more information, see Resolving OnBeforeTestRun and OnAfterTestRun Trigger Errors When
Converting a Database.
The triggers for codeunit 130400 CAL Test Runner and 130402 CAL Command Line Test Runner will
be updated for you during the data upgrade.

Task 12: Run the schema synchronization on the imported objects


Synchronize the database schema with validation. You can run the schema synchronization from the Microsoft
Dynamics NAV Development Environment or Microsoft Dynamics NAV Administration Shell.
For more information, see How to: Synchronize the Tenant Database with the Application Database.

Task 13: Run the data upgrade process


A data upgrade runs the upgrade toolkit objects, such as upgrade codeunits and upgrade tables, to migrate
business data from the old table structure to the new table structure. You can start the data upgrade from the
Microsoft Dynamics NAV Development Environment or Microsoft Dynamics NAV Administration Shell.

NOTE
In the last phase of data upgrade, all companies will be initialized by running codeunit 2 Company Initialization. This is
done automatically. If you want to skip company initialization, then use the Start-NavDataUpgrade cmdlet and set the -
SkipCompanyIntitialization parameter.

From the development environment:


Open development environment as an administrator. On the Tools menu, choose Data Upgrade, and then
choose Start and follow the instructions.
To view the progress of the data upgrade, on the Tools menu, choose Data Upgrade, and then choose Show
Progress.
From the Microsoft Dynamics NAV Administration Shell:
Open the Microsoft Dynamics NAV Administration Shell as an administrator, and then run Start-
NavDataUpgrade cmdlet as follows:

Start-NavDataUpgrade -ServerInstance <ServerInstanceName> -Force

Replace <ServerInstanceName> with the name of the Microsoft Dynamics NAV Server instance that is connected
to the database.
To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch.
The data upgrade process runs CheckPreconditions and Upgrade functions in the upgrade codeunits. If any of
the preconditions are not met or an upgrade function fails, you must correct the error and resume the data
upgrade process. If CheckPreconditions and Upgrade functions are executed successfully, codeunit 2 is
automatically run to initialize all companies in the database unless you set the -SkipCompanyIntitialization
parameter.

Task 14: Import upgraded permission sets and permissions by using


the Roles and Permissions XMLports
You import the permission sets and permissions XML files.
1. Delete all permission sets in the database except the SUPER permission set.
In Object Designer, run page 9802 Permission Sets, and then delete the permission sets.
2. Run XMLport 9171 and XMLport 9172 to import the permission sets and permission XML files.
For more information, see How to: Export and Import Permission Sets and Permissions.

Task 15: Set the language of the customer database


In the development environment, choose Tools, choose Language, and then select the language of the original
customer database.

Task 16: Register client control add-ins


The database is now fully upgraded and is ready for use. However, Microsoft Dynamics NAV 2018 includes the
following client control add-ins.
Microsoft.Dynamics.Nav.Client.BusinessChart
Microsoft.Dynamics.Nav.Client.DynamicsOnlineConnect
Microsoft.Dynamics.Nav.Client.FlowIntegration
Microsoft.Dynamics.Nav.Client.OAuthIntegration
Microsoft.Dynamics.Nav.Client.PageReady
Microsoft.Dynamics.Nav.Client.PingPong
Microsoft.Dynamics.Nav.Client.SocialListening
Microsoft.Dynamics.Nav.Client.TimelineVisualization
Microsoft.Dynamics.Nav.Client.VideoPlayer
Microsoft.Dynamics.Nav.Client.WebPageViewer
To use these add-ins, they must be registered in table 2000000069 Client Add-in. Depending on the version
that you upgraded from, all the add-ins might not be registered after the upgrade process. You can register
missing control add-ins in the Control Add-ins page in the Microsoft Dynamics NAV Windows client. The
assemblies (.dlls) for these add-ins are in subfolders to the Add-ins folder of the Dynamics NAV Server
installation, which by default is C:\Program Files\Microsoft Dynamics NAV\110\Service\Add-ins. For more
information, see How to: Register a Windows Client Control Add-in.

Task 17: Publish and install/upgrade extensions


Microsoft Dynamics NAV 2018 includes several extensions that you publish and install as part of the upgrade
process. To enable these extensions, it is important that you follow the steps below.
1. Download the system and test symbols file from the ModernDev folder on the DVD and the application
symbols from here. Make a note of the path where you store the files.
2. Publish the platform, test, and application symbols one file at a time to the Dynamics NAV server
instance:
Open the Microsoft Dynamics NAV Administration Shell as an administrator, and run the following
command for each of the symbol files:
Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <SymbolFilePath> -PackageType SymbolsOnly

3. Make sure that Enable loading application symbol references at server startup
(EnableSymbolLoadingAtServerStartup) is set on the Dynamics NAV server instance.
For more information, see Configuring Dynamics NAV Server.
4. Generate the application symbol references for running Running C/SIDE and AL Side-by-Side:
a. Open a command prompt, change to the directory where the finsql.exe file has been installed as
part of Microsoft Dynamics NAV 2018, and then run the following command:

finsql.exe Command=generatesymbolreference, Database=<MyDatabaseName>, ServerName=


<DatabaseServerName>\<DatabaseInstance>

Replace values for the Database and ServerName settings to suit.

NOTE
This command does not generate a file. It populates the Object Metadata table in the database.

b. When you run the command, the console returns to an empty command prompt, and does not
display or provide any indication about the status of the run. However, the finsql.exe may still be
running in the background. It can take several minutes for the run to complete, and the symbols
will not be generated until such time. You can see whether the finsql.exe is still running by using
Task Manager and looking on the Details tab for finsql.exe.
When the process ends, a file named navcommandresult.txt is saved to the Microsoft Dynamics
NAV Windows client installation folder. If the command succeeded, the file will contain text like
[0] [06/12/17 14:36:17] The command completed successfully in '177' seconds. If the command
failed, another file named naverrorlog.txt will be generated. This file contains details about the
error(s) that occurred.
For more information about generation symbols, see Running C/SIDE and AL Side-by-Side.
5. Publish all the extensions from the \Extensions folder of the Microsoft Dynamics NAV 2018 installation
media (DVD ):
a. From the Microsoft Dynamics NAV Administration Shell, run the following command for each
extension.

Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <ExtensionFileName>

V1 extensions have the file type .navx . V2 extensions have the file type .app .
b. For each Extension V2, run the following command to synchronize its schema with the tenant
database:

Sync-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

For more information about publishing extensions, see How to: Publish and Install an Extension.
6. Upgrade the V1 extensions that you uninstalled previously in Task 3 by reinstalling them. From the
Microsoft Dynamics NAV Administration Shell, run the following commands:
a. To get a list of the published extensions on the server instance, run this command:

Get-NAVAppInfo -ServerInstance <ServerInstanceName>

b. To determine which V1 extensions to install, inspect the list that appears, and compare it with the
list that you gathered in Task 3. V1 extensions are indicated by Extension Type : CSIDE .
If there is only one version of an extension, which matches the version in the old list, then go to
step 6c to reinstall the version.
If there is a newer version of an extension and its Extension Type is also CSIDE , then go to step
6c to install and upgrade to the newer V1 extension.
If there is a newer version of an extension but its Extension Type is ModernDev , then go to step
6d to upgrade the old V1 extension to the V2 extension.
c. For each V1 Extension that you want to reinstall or upgrade, run this command:

Install-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N> –Tenant


<TenantID>

Replace <Name> and <N.N.N.N> with the name and version of the Extension V1 as it appeared in
the previous step. For <TenantID> , in single-tenant deployments, you either specify default or
you omit the –Tenant parameter.
This will upgrade the V1 extensions.
Optionally, if you installed a newer version of an extension, unpublish the old version:

Unpublish-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

d. For each V1 Extension that you want to upgrade to a V2 Extension, run these commands:

Sync-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>


Start-NAVAppDataUpgrade -ServerInstance DynamicsNAV -Name ProswareStuff -Version <N.N.N.N>

This will upgrade the V2 extensions.


Optionally, unpublish the V1 extension.

Unpublish-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

7. For the Denmark (DK) local version of Microsoft Dynamics NAV 2018, you must install the following new
V2 extensions to get all the local functionality.

NAME PUBLISHER VERSION

Payroll Data Import Definitions (DK) Microsoft 1.0.19502.0 (or later)

Payment and Reconciliation Formats Microsoft 1.0.19502.0 (or later)


(DK)

Tax File Formats (DK) Microsoft 1.0.19502.0 (or later)

For each Extension V2, run this command:


Install-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

8. Recompile published V1 extensions.


Use the Repair-NAVApp cmdlet of the Microsoft Dynamics NAV 2018 Administration Shell to compile
the published extensions to make sure they are work with the new platform and application.
For example, you can run the following command to recompile all extensions:

Get-NAVAppInfo -ServerInstance <ServerInstanceName> | Repair-NAVApp

Task 18: Update the Dynamics NAV Web client configuration file
(navsettings.json)
If you have installed the Microsoft Dynamics NAV Web Server components, populate the navsettings.json file
for the Dynamics NAV Web Server instance with the settings of the old web.config file.
For more information, see Configuring Microsoft Dynamics NAV Web Client by Modifying the NavSettings.json
File.

Task 19: Delete the upgrade objects


At this point, you have upgraded the database to Microsoft Dynamics NAV 2018. Now, you can delete the
upgrade codeunits and upgrade table objects that you imported in task 9. This task is recommended but not
required.
When you delete tables, on the Delete dialog box, set the Synchronize Schema option to Force.

See Also
Upgrading the Application Code
Automating the Upgrade Process using Sample Windows PowerShell Scripts
Synchronizing Table Schemas
Upgrading to Microsoft Dynamics NAV
Automating the Upgrade Process using Sample
Windows PowerShell Scripts
1/2/2018 • 5 min to read • Edit Online

Applies to: Microsoft Dynamics NAV 2018. See Microsoft Dynamics NAV 2017 version.
You can use Windows PowerShell scripts to help you upgrade to the latest version of Dynamics NAV. You can use
automation to upgrade a single Dynamics NAV database as well as multiple Dynamics NAV databases that use
the same application. Microsoft Dynamics NAV 2018 provides sample scripts that you can adapt for your
deployment architecture.

Automating the Upgrade Process


When you upgrade to Microsoft Dynamics NAV 2018, you must first upgrade the application code, and then you
upgrade the data. By using Windows PowerShell, you can automate both parts of the upgrade process. Also, you
can use the same scripts to test each step in your upgrade process before you upgrade production databases.
Also, if you maintain multiple Dynamics NAV databases, for example if you support multiple customers with the
same Dynamics NAV application, you can reduce the time that you spend upgrading each database by using
Windows PowerShell scripts. In that case, you can upgrade the application locally, and then use scripts to roll out
the upgrade of each database with reduced unavailability for each database. You can combine this automated
upgrade with a migration to multitenancy if this makes maintenance easier for you.
The Sample Scripts for Code Upgrade
Dynamics NAV includes sample scripts that illustrate how you can use Windows PowerShell cmdlets to upgrade
your application to the latest version of Dynamics NAV. The sample scripts are located in the
ApplicationMergeUtilities folder under the WindowsPowerShellScripts folder on the Dynamics NAV
product media. The sample scripts illustrate how you can create scripts that you run in the Microsoft Dynamics
NAV Development Shell or the Windows PowerShell Integrated Scripting Environment (ISE ).
The sample scripts show different ways of merging application objects that can help you find the best approach to
upgrade your application code. The ApplicationMergeUtilities folder contains four subfolders that can help you
start working with the scripts. The demonstration data in the ORIGINAL, MODIFIED, and TARGET folders
illustrate the text files that are the input to the cmdlets. The __Run-Application-Merge-Utilities.ps1 script runs the
sample scripts based on simplified demonstration data. For more information, see Merging Application Objects
using the Example Scripts.
The Sample Scripts for Data Upgrade
Dynamics NAV includes sample scripts that illustrate how you can automate the upgrade of data to the latest
version of Dynamics NAV. The sample scripts are located in the Upgrade folder under the
WindowsPowerShellScripts folder on the Dynamics NAV product media. The sample scripts include a HowTo
script that illustrates how you can use the Dynamics NAV cmdlets and sample scripts.
The HowTo-UpgradeNAVDatabase.ps1 script illustrates how you can create a script that upgrades a database
from an earlier version of Dynamics NAV to a new version through a set of upgrade tasks. You can run the sample
script using a partner license or a customer license.
The Upgrade folder also contains the Set-PartnerSettings.ps1 where you can specify values for the input
parameters that the HowTo-UpgradeNAVDatabase.ps1 script requires, such as the database that you want to
upgrade. You must also specify the folder where the license is stored. Finally, you must specify the location of the
.fob file with the upgraded application objects. Optionally, the upgrade toolkit objects can be part of that .fob file,
or they can be stored in a separate .fob file and import them later.
The Example.ps1 script reads the upgrade parameters from the Set-PartnerSettings.ps1 script, calls the HowTo
script, passing the upgrade parameters, and then shows the detailed information about each upgrade task. To run
the sample script for the data upgrade of a Dynamics NAV database, you must have a Microsoft Dynamics NAV
2013, Microsoft Dynamics NAV 2013 R2, or Microsoft Dynamics NAV 2015 database that is available on a SQL
Server instance and is ready to be upgraded. The Example.ps1 script runs the following main steps:
1. Loads the settings from the Set-PartnerSettings.ps1 file, and prepares the Windows PowerShell session by
importing the required modules.
2. Saves the current license from the Microsoft Dynamics NAV 2013, Microsoft Dynamics NAV 2013 R2, or
Microsoft Dynamics NAV 2015 database.
3. Creates a backup of the Microsoft Dynamics NAV 2013, Microsoft Dynamics NAV 2013 R2, or Microsoft
Dynamics NAV 2015 database, and then converts the database to Microsoft Dynamics NAV 2018.
4. Connects the Microsoft Dynamics NAV 2018 Server instance to the converted database, imports the
Microsoft Dynamics NAV 2018 license file, and then synchronizes the table schema.
5. Imports the application objects and upgrade toolkit objects from the specified .fob file, and then
synchronizes the table schema again. This updates the SQL Server database based on the new table
schema that is defined by the imported application objects. Data that must be mapped to another table is
saved in upgrade tables.
6. Calls the Start-NAVDataUpgrade cmdlet to verify the data upgrade preconditions and transfer data from
the upgrade tables to the destination tables.
7. Deletes all obsolete tables and the upgrade toolkit objects.
8. Initializes all companies in the upgraded database. If you specified a RapidStart package in the Set-
PartnerSettings.ps1 file, the package is applied to all companies.
The sample script is intended to be run in the context of a Microsoft Dynamics NAV 2018 deployment,
including the Microsoft Dynamics NAV Server instance. The Microsoft Dynamics NAV Server instance
cannot be multitenant. When the sample script runs successfully, the result is a Microsoft Dynamics NAV
2018 database that is connected to a Microsoft Dynamics NAV 2018 Server instance, and which uses a
Microsoft Dynamics NAV 2018 license. The sample script also returns a list of statistics about the upgrade
tasks, including information about whether the task ran or not. If a task failed, it is marked, and the
information includes the error message and stack trace to help you identify the problem. You can resolve
errors in the Microsoft Dynamics NAV Development Environment, save changes, and then run the sample
script again, using the database backup that you created earlier.

See Also
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Sample Windows PowerShell Scripts for Microsoft Dynamics NAV
Merging Application Objects using the Example Scripts
Upgrading the Application Code
Upgrading to Microsoft Dynamics NAV 2017
Welcome to the API for Dynamics 365 Business
Central
5/31/2018 • 1 min to read • Edit Online

With Dynamics 365 you can create Connect apps. Connect apps establishes a point-to-point connection between
Dynamics 365 Business Central and a 3rd party solution or service and is typically created using standard REST
API to interchange data. Any coding language capable of calling REST APIs can be used to develop your Connect
app. For more information to get started on Connect apps, see Developing Connect Apps for Dynamics 365
Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

TIP
For information about developing extensions in AL see Development in AL.

See also
Enabling the APIs for Microsoft
Dynamics NAV
4/16/2018 • 1 min to read • Edit Online

Dynamics NAV exposes an API that makes it possible to integrate with other services.
To enable integration with these APIs, you must go through a few steps to enable the
access for Dynamics NAV.

Enable access to the APIs


1. Open Dynamics NAV Administration tool.
2. Expand the OData Services tab, and select the Enable OData Services
checkbox first, then select the Enable API Services checkbox.
3. Check that the values for the OData Base URL and Port are entered correctly.
When exposing a web service, you must open the port for other consumers of
your web service to access it. You can have your system administrator add the
port through Windows Firewall on the computer running Microsoft Dynamics
NAV Server. The default port for ODdata web services is 7048.
4. In Dynamics NAV, search for API Setup and then choose the related link.
5. On the API Setup page, choose the Integrate APIs button.
This will start a process of populating all the integration tables with records for all
APIs. The process can take several minutes.
Depending on where you want to access the APIs from, you must specify the correct
endpoint. For more information, see Endpoints for APIs.

See Also
API Documentation (Preview )
Developing Connect Apps for Dynamics 365 Business Central
Configuring Microsoft Dynamics NAV Server
Microsoft Dynamics NAV Web Services Overview
Endpoints for the APIs for Microsoft
Dynamics NAV and Microsoft Dynamics
365 Business Central
4/16/2018 • 1 min to read • Edit Online

Dynamics NAV and Dynamics 365 Business Central expose an API that makes it possible to
integrate with other services. To enable integration with these APIs, for Dynamics NAV you
must go through a few steps to enable the access first. For more information about these
steps, see Enabling APIs for Microsoft Dynamics NAV.

Accessing the endpoint


Once you have the API access enabled, you can write code that integrates your web service
or SaaS solution with Dynamics NAV. Creating your integration through an API provides
simple access to the supported functionality in a single endpoint, giving you a simplified
experience for creating a single app with integrations across multiple Microsoft products.

DYNAMICS 365 MICROSOFT


BUSINESS DYNAMICS
CENTRAL NAV 2018

Means of Microsoft Common Direct tenant Direct


connection Graph (coming) endpoint installation
service

Usage Production Production Rapid Production


development
and testing only

Endpoint https:// https:// https:// OData base URL


graph.microsoft.com api.businesscentral.dynamics.com/ in installation:
api.businesscentral.dynamics.com/
/businesscentral/beta/
v1.0/api/beta v1.0/<user https://
domain <base URL>:
name>/api/beta <port>/v1.0/api/<API
Example: version>/
https:// Example:
https://
api.businesscentral.dynamics.com/
nav.contoso.com:7048/
v1.0/cronus.com/api/beta
v1.0/api/beta/
Must be exposed
through a
firewall.

Availability Always enabled Always enabled Always enabled Disabled by


default.
Must be enabled
by the
administrator.
DYNAMICS 365 MICROSOFT
BUSINESS DYNAMICS
CENTRAL NAV 2018

Authentication Azure Active Azure Active Basic Basic


Directory Directory authentication. authentication.
(AAD) (AAD) Username and Username and
web service web service
access key as access key as
password. password.

API/Data access Based on user's Based on user's Based on user's Based on user's
permissions permissions permissions permissions

API update Monthly Monthly Monthly Hotfixes installed


cycle by partner

Development Sign up for a Sign up for a Sign up for a Get Docker


instance tenant tenant tenant instance

See Also
API Documentation (Preview )
Developing Connect Apps for Dynamics 365 Business Central
Configuring Microsoft Dynamics NAV Server
Microsoft Dynamics NAV Web Services Overview
Error Codes
11/24/2017 • 3 min to read • Edit Online

The following table lists the error codes for the various exceptions in the web service
response for ODataV4.

Error code categorization


The error codes in the table below can be divided into the following categories and
described as follows:

CATEGORY DESCRIPTION RESOLUTION

BadRequest_* Will typically be an error in the Resolve the bug in the forming
forming of the request or an of the request.
error accessing the service.

Authentication_* An error authenticating to the Attempt to use different


service. credentials.

Authorization_* The authenticated identity does Attempt operation using


not have the correct different credentials.
permissions.

Internal_* Typically this is an internal error Attempt the operation again.


in the application on the server Resolve data issues.
or data integrity issue. For
example, the Dynamics NAV
instance cannot communicate
with the SQL Server.

Application_* Typically an application logic Request is made again with


error. updated data.

Error codes
EXCEPTION TYPE ERROR MESSAGE ERROR CODE

ODataArgumentException An incompatible property BadRequest_InvalidRequestUrl


definition
already exists for
'Allowed_Companies_0.Name'

ODataNotFoundException Bad Request - Error in query BadRequest_NotFound


syntax
EXCEPTION TYPE ERROR MESSAGE ERROR CODE

ODataNotFoundException Expression expected at position BadRequest_NotFound


153 in
'(AAMkAGY2ZTQwODIwLTNkO
WYtN
DY3NC04N2JkLTE3MDEyNzlk
M2VkOQBGAAAAAAD
FMnbflwH_RqlNoMYdjhvBBwCe
pO6AHq7GRJ13ldPngx5BAAA
AAAEcAA
CepO6AHq7GRJ13ldPngx5BAA
AGZyTmAAA=)'

ODataNotFoundException '|' or ',' expected at position 3 in BadRequest_NotFound


(GUID)

ODataResourceNotFoundExcep Resource not found for the BadRequest_ResourceNotFound


tion segment
'OfficeAppResourceRegistrations'
multiple segment errors
(Company, v1.0,
nativeInvoicingSalesInvoices,me
tadata,
nativeInvoicingItems,
companies,company etc.)

ODataInvalidOperationExceptio Control BadRequest_InvalidOperation


n 'Last Date Modified' is
read-only

ODataBadRequestException Invalid Request Body BadRequest

ODataBadRequestException Unable to convert value to BadRequest


Date

ODataBadRequestInvalidToken Could not validate the client BadRequest_InvalidToken


Exception concurrency token required by
the service.
Please provide a valid token in
the client request.

ODataBadRequestNullFieldExce Field 'taxable' must not be BadRequest_RequiredParamNot


ption blank or empty. Provided

ODataConflictException Another user has already Request_EntityChanged


changed the record.

ODataMethodNotAllowedExce 'POST' requests for BadRequest_MethodNotAllowe


ption 'companies' of EdmType d
'Entity'
are not allowed within
Microsoft Dynamics NAV
OData web services.

ODataNotImplementedExcepti Entity does not support bound BadRequest_MethodNotImple


on actions mented
EXCEPTION TYPE ERROR MESSAGE ERROR CODE

NavCSideDataException There is no Cust. Ledger Entry Internal_DataNotFoundFilter


within the filter.

NavCSideRecordNotFoundExce The Acc. Sched. KPI Web srv. Internal_RecordNotFound


ption Setup does not exist.
Identification fields and values:
Primary Key=''

NavCSideValidateTableRelationE The field Account No. of table Internal_InvalidTableRelation


xception Gen. Journal Line contains a
value (ABL001)
that cannot be found in the
related table (Vendor).

NavCSideException Cannot establish a connection Internal_ServerError


to the SQL Server/Database.

NavCSideDuplicateKeyExceptio The Attachment Entity Buffer Internal_EntityWithSameKeyExi


n already exists. sts
Identification fields and values:
Document Id=
'{DAC3AB2F-5FEA-4AD2-
A663-EF832F270A7B}',Id='
{00000000-0000-0000-0000-
000000000000}'

NavCompanyNotFoundExcepti Cannot process the request Internal_CompanyNotFound


on because the default company
cannot be found.
You can specify a default
company in the service
configuration file,
or specify one for each tenant,
or you can add a query string
in the form of "company=
[name]".
You can see the available
companies by accessing the
default OData web service,
Company.
For more information, see
"OData Web Services" in Help

NavTenantNotAccessibleExcepti The tenant Internal_TenantUnavailable


on 'msca1a7355t05263373' is not
accessible

NavNCLDialogException You cannot delete Item 1000 Application_DialogException


because there is at least one
outstanding Sales Quote that
includes this item.

NavNCLDialogException A customerNumber or a Application_DialogException


customerID must be provided.
EXCEPTION TYPE ERROR MESSAGE ERROR CODE

NavNCLDialogException You may not enter numbers Application_DialogException


manually. If you want to enter
numbers manually,
please activate Manual Nos. in
No. Series FA.

NavNCLDialogException You are not allowed to apply Application_DialogException


and post an entry to an entry
with an earlier posting date.

NavNCLDialogException The "amount" should be a Application_DialogException


negative number.

NavNCLEvaluateException The value "Depreciation" Application_EvaluateException


cannot be evaluated into type
Option.

NavNCLStringLengthExceededE The length of the string is 57, Application_StringExceededLen


xception but it must be less than or gth
equal to 50 characters. Value:
JACKSBORO PUMP &
SPECIALTY
BRIDGEPORT PUMP & SUPPLY,
INC.

NavNCLInvalidGuidFormatExce Invalid format of GUID string. Application_InvalidGUID


ption The correct format of the GUID
string is: CDEF7890-ABCD-
0123-1234-567890ABCDEF
where
0-9, A-F symbolizes
hexadecimal digits.

NavNCLCallbackNotAllowedExc Microsoft Sync 365 for fin Data Application_CallbackNotAllowe


eption services attempted to issue a d
client callback
to show a confirmation dialog
box. We found an item with the
description

NavFilterException The filter Application_FilterErrorException


"='SELLACRE24_W%2FOORINGS'"
is not valid for the No. field
on the Item table. The length
of the string is 22, but it must
be less than or equal to 20
characters.
Value:
SELLACRE24_W%2FOORINGS

NavTestFieldException Balance must be equal to '0' in Application_FieldValidationExce


G/L Account: No.=10100. ption
Current value is '1,638.4'.
Customer Posting Group must
have a value
in Customer: No.=C00690. It
cannot be zero or empty.
EXCEPTION TYPE ERROR MESSAGE ERROR CODE

NavTestFieldException Customer Posting Group must Application_FieldValidationExce


have a value in Customer: ption
No.=C00690. It cannot be zero
or empty.

NavInvalidCredentialException The server has rejected the Authenciation_InvalidCredential


client credentials s

Any Any Unknown

See also
Working with Dynamics 365 for Financials in Microsoft Graph
accounts resource type
3/23/2018 • 1 min to read • Edit Online

Represents an account object in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET accounts accounts Get accounts object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the account.

number string, maximum size 20 Specifies the number of the G/L


account.

displayName string, maximum size 50 Specifies the name of the G/L account.

category string, maximum size 20 Specifies the category of the G/L


account.

subCategory string, maximum size 80 Specifies the subcategory of the


account category of the G/L account.

blocked boolean Specifies that entries cannot be posted


to the G/L account. True indicates
account is blocked and posting is not
allowed.

lastModifiedDateTime datetime The last datetime the account was


modified.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"id": "GUID",
"number": "string",
"displayName": "string",
"category": "string",
"subCategory": "string",
"blocked": "boolean",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Account
Aged Accounts Payable
Aged Accounts Receivable
Get accounts
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an account object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/accounts({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an accounts object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/accounts({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"number": "10700",
"displayName": "Inventory",
"category": "Assets",
"subCategory": "Inventory",
"blocked": false,
"lastModifiedDateTime": "2017-03-15T02:20:58.747Z"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Account
Get Aged Accounts Payable
Get Aged Accounts Receivable
agedAccountsPayable resource type
3/23/2018 • 1 min to read • Edit Online

Represents an agedAccountsPayable object in Dynamics 365 Business Central, which is showing the aging of a
vendor account.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET agedAccountsPayable agedAccountsPayable Get agedAccountsPayable object

Properties
PROPERTY TYPE DESCRIPTION

vendorId GUID The unique ID of vendor.

vendorNumber string Specifies vendor's number.

name string Specifies vendor's name.

currencyCode string Specifies the currency.

before numeric Specifies balance before first aging


period.

period1 numeric Specifies balance in the first aging


period.

period2 numeric Specifies balance in the second aging


period.

period3 numeric Specifies balance in the third aging


period.

after numeric Specifies balance after third aging


period.

balance numeric Specifies vendor's total balance.

periodStartDateFilter date Specifies period start date used to


calculate aging periods.
PROPERTY TYPE DESCRIPTION

periodLengthFilter string Specifies the length of the periods.

Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"vendorId": "GUID",
"vendorNumber": "string",
"name": "string",
"currencyCode": "string",
"before": "decimal",
"period1": "decimal",
"period2": "decimal",
"period3": "decimal",
"after": "decimal",
"balance": "decimal",
"periodStartDateFilter": "date",
"periodLengthFilter": "string"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Aged Accounts Payable
Aged Accounts Receivable
Account
Get agedAccountsPayable
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an aged accounts payable report object for Dynamics 365 Business
Central.

HTTP request
GET /businesscentral/companies({id})/agedAccountsPayable

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an agedAccountsPayable object in the response
body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/agedAccountsPayable

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"vendorId": "id-value",
"vendorNumber": "50000",
"name": "Nod Publishers",
"currencyCode": "USD",
"balanceDue": 17273.87,
"currentAmount": 0,
"period1Amount": 0,
"period2Amount": 0,
"period3Amount": 17273.87,
"agedAsOfDate": "2019-01-01",
"periodLengthFilter": "3M"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Aged Accounts Payable
Get Aged Accounts Receivable
Account
agedAccountsReceivable resource type
3/23/2018 • 1 min to read • Edit Online

Represents an agedAccountsReceivable object in Dynamics 365 Business Central, which is showing the aging of a
customer account.

NOTE
For information about enabling APIs for Dynamics NAV, see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET agedAccountsReceivable agedAccountsReceivable Get agedAccountsReceivable object

Properties
PROPERTY TYPE DESCRIPTION

customerId GUID The unique ID of customer.

customerNumber string Specifies customer's number.

name string Specifies customer's name.

currencyCode string Specifies the currency.

before numeric Specifies balance before first aging


period.

period1 numeric Specifies balance in the first aging


period.

period2 numeric Specifies balance in the second aging


period.

period3 numeric Specifies balance in the third aging


period.

after numeric Specifies balance after third aging


period.

balance numeric Specifies customer's total balance.

periodStartDateFilter date Specifies period start date used to


calculate aging periods.
PROPERTY TYPE DESCRIPTION

periodLengthFilter string Specifies the length of the periods.

Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"customerId": "GUID",
"customerNumber": "string",
"name": "string",
"currencyCode": "string",
"before": "decimal",
"period1": "decimal",
"period2": "decimal",
"period3": "decimal",
"after": "decimal",
"balance": "decimal",
"periodStartDateFilter": "date",
"periodLengthFilter": "string"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Aged Accounts Receivable
Aged Accounts Payable
Account
Get agedAccountsReceivable
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an aged accounts receivable report object for Dynamics 365 Business
Central.

HTTP request
GET /businesscentral/companies({id})/agedAccountsReceivable

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an agedAccountsReceivable object in the
response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/agedAccountsReceivable

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"customerId": "id-value",
"customerNumber": "30000",
"name": "Relecloud",
"currencyCode": "USD",
"balanceDue": 349615.45,
"currentAmount": 0,
"period1Amount": 349615.45,
"period2Amount": 0,
"period3Amount": 0,
"agedAsOfDate": "2017-04-25",
"periodLengthFilter": "3M"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Aged Accounts Receivable
Get Aged Accounts Payable
Account
balanceSheet resource type
3/23/2018 • 1 min to read • Edit Online

Represents a balanceSheet object in Dynamics 365 Business Central. A balance sheet is a statement of the assets,
liabilities, and capital of a business at a specific point in time.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET balanceSheet balanceSheet Get a balanceSheet object.

Properties
PROPERTY TYPE DESCRIPTION

lineNumber numeric The balanceSheet item line number.

display string The balanceSheet item display name.

balance numeric The balanceSheet item balance.

lineType string The balanceSheet item line type can be:


header, detail, total, or spacer.

indentation numeric The balanceSheet item indentation used


in report layout.

dateFilter date The date filter used to calculate the


balanceSheet items.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"lineNumber": "int",
"display": "string",
"balance": "decimal",
"lineType": "string",
"indentation": "int",
"dateFilter": "date"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Balance Sheet
Cash Flow Statement
Get balanceSheet
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a balance sheet report object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/balanceSheet

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a balanceSheet object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/balanceSheet?
$orderby=lineNumber&$filter=dateFilter eq 2020-12-30

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"lineNumber": 10000,
"display": "Assets",
"balance": 11860.69,
"lineType": "header",
"indentation": 0,
"dateFilter": "2020-12-30"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Balance Sheet
Get Cash Flow Statement
Get Account
Working with Dynamics 365 for Financials in Microsoft Graph
cashFlowStatement resource type
3/23/2018 • 1 min to read • Edit Online

Represents an cashFlowStatement object in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET cashFlowStatement cashFlowStatement Get a cashFlowStatement object.

Properties
PROPERTY TYPE DESCRIPTION

lineNumber numeric The cashFlowStatement item line


number.

display string The cashFlowStatement item display


name.

netChange numeric The cashFlowStatement item Net


Change.

lineType string The cashFlowStatement item line type


can be: header, detail, total, or spacer.

indentation numeric The cashFlowStatement item


indentation used in report layout.

dateFilter date The date filter used to calculate the


cashFlowStatement items.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"lineNumber": "int",
"display": "string",
"netChange": "decimal",
"lineType": "string",
"indentation": "int",
"dateFilter": "date"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Cash Flow Statement
Balance Sheet
Get cashFlowStatement
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a cash flow statement report object for Dynamics 365 Business
Central.

HTTP request
GET /businesscentral/companies({id})/cashFlowStatement

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a cashFlowStatement object in the response
body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/cashFlowStatement?
$orderby=lineNumber&$filter=dateFilter ge 2019-01-01 and dateFilter le 2020-12-31

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"lineNumber": 90000,
"display": "Net Cash Provided by Operating Activities",
"netChange": 39133.89,
"lineType": "total",
"indentation": 1,
"dateFilter": "2016-12-31"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Cash Flow Statement
Get Balance Sheet
companies resource type
3/23/2018 • 1 min to read • Edit Online

Represents a companies resource type in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET companies companies Get a company.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the company. Read-


Only.

name string Specifies the Company.

displayName string Specifies the company display name.

systemVersion string Specifies the internal version of the


company.

businessProfileId string Specifies the Business Profile ID linked


to the company.

Relationships
None

JSON representation
Here is a JSON representation of the company.

{
"id": "GUID",
"name": "string",
"displayName": "string",
"systemVersion": "string",
"businessProfileId": "string"
}
See Also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Companies
Company Information
Get Company Information
Update Company Information
Get companies
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a companies object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a companies object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"systemVersion": "17806",
"name": "CRONUS US",
"displayName": "CRONUS USA, Inc.",
"businessProfileId": ""
}
See Also
Working with Dynamics 365 Business Central in Microsoft Graph
companyInformation resource type
3/23/2018 • 1 min to read • Edit Online

Represents the information specified for the current company in Dynamics 365 Business Central, such as name,
address, email address, and website address.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET companyInformation companyInformation Gets a company information.

PATCH companyInformation companyInformation Updates a company information.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the company. Non-


editable.

displayName string The company's display name.

address NAV.PostalAddress The company's address. View the


complex type for additional detail.

phoneNumber string The company's telephone number.

faxNumber string The company's fax number.

email string The company's email address.

website string The company's website address.

taxRegistrationNumber string The company's tax registration number.

currencyCode string The currency the company does


business in. Read-Only.

currentFiscalYearStartDate date The company's current fiscal year start


date. Read-Only.

industry string The industry the company is part of.


PROPERTY TYPE DESCRIPTION

picture stream The company logo. Read-Only.

businessProfileId string The business profile ID linked to the


Financials company. Read-Only.

lastModifiedDateTime datetime The last datetime the company was


modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the companyInformation

{
"id": "GUID",
"displayName": "string",
"address": "NAV.PostalAddress",
"phoneNumber": "string",
"faxNumber": "string",
"email": "string",
"website": "string",
"taxRegistrationNumber": "string",
"currencyCode": "string",
"currentFiscalYearStartDate": "date",
"industry": "string",
"picture": "stream",
"businessProfileId": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Get companyInformation
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a company information object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/companyInformation({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a companyInformation object in the response
body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/companyInformation({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"displayName": "CRONUS USA, Inc.",
"address": {
"street": "7122 South Ashford Street\r\nWestminster",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "+1 425 555 0100",
"faxNumber": "+1 425 555 0101",
"email": "",
"website": "",
"taxRegistrationNumber": "",
"currencyCode": "USD",
"currentFiscalYearStartDate": "2018-01-01",
"industry": "",
"picture@odata.mediaReadLink":
"https://api.financials.dynamics.com/v1.0/api/beta/companies({id})/companyInformation({id})/picture",
"businessProfileId": "",
"lastModifiedDateTime": "2017-03-16T14:57:19.497Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Companies
Company Information
Update Company Information
Update companyInformation
3/23/2018 • 1 min to read • Edit Online

Update the properties of a company information object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/companyInformation({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
companyInformation, the companyInformation will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated an companyInformation object in
the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/companyInformation({id})
Content-type: application/json

{
"displayName": "CRONUS USA, LTD.",
"website": "www.cronuscorp.net"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"displayName": "CRONUS USA, LTD.",
"address": {
"street": "7122 South Ashford Street\r\nWestminster",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "+1 425 555 0100",
"faxNumber": "+1 425 555 0101",
"email": "",
"website": "www.cronuscorp.net",
"taxRegistrationNumber": "",
"currencyCode": "USD",
"currentFiscalYearStartDate": "2018-01-01",
"industry": "",
"picture@odata.mediaReadLink":
"https://api.financials.dynamics.com/v1.0/api/beta/companies({id})/companyInformation({id})/picture",
"lastModifiedDateTime": "2017-03-16T14:57:19.497Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Companies
Company Information
Get Company Information
complex types JSON
3/23/2018 • 2 min to read • Edit Online

These are the various complex types in Dynamics 365 Business Central. You can see usage of these complex
types in the various individual methods that make use of them.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Item category
Represents an Item Category complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

categoryId string The unique ID of the item category.

description string Specifies the description of the item


category.

"ItemCategory"
{
"categoryId": "string",
"description": "string"
}

Unit of measure
Represents a Unit of Measure complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

code string The unique ID of the unit of measure.

displayName string Specifies the description of the unit of


measure.

symbol string Specifies a graphical representation of


the unit of measure.

unitConversion Specifies the conversion rate to a


different (target) unit of measure.
"UnitOfMeasure"
{
"code": "string",
"displayName": "string",
"symbol": "string",
"unitConversion": "NAV.ItemUnitOfMeasureConversion"
}

Unit of measure conversion


Represents a Unit of Measure Conversion complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

toUnitOfMeasure string Specifies the unit of measure to


convert to.

fromToConversionRate decimal Specifies what the (source) base unit of


measure is multiplied with in order to
convert to the target unit of measure.

"ItemUnitOfMeasureConversion"
{
"toUnitOfMeasure": "string",
"fromToConversionRate": "decimal"
}

Payment method
Represents a Payment Method complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

code string The unique code of the payment


method.

description string Specifies a text that describes the


payment method.

"PaymentMethod"
{
"code": "string",
"description": "string"
}

Payment terms
Represents a Payment Terms complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

code string The unique code of the payment terms.

description string Specifies a text that describes the


payment terms.

"PaymentTermsType"
{
"code": "string",
"description": "string"
}

Postal address
Represents a Postal Address complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

street string Postal address street.

city string Postal address city.

state string Postal address state.

countryLetterCode string Postal address country letter code (two


character word)

postalCode string Postal address post code

"PostalAddress"
{
"street": "string",
"city": "string",
"state": "string",
"countryLetterCode": "string",
"postalCode": "string"
}

Shipment method
Represents a Shipment Method complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

code string The unique code of the shipment


method.

description string Specifies the description of the


shipment method.
"ShipmentMethod"
{
"code": "string",
"description": "string"
}

Line details
Represents a Line Details complex type in Dynamics 365 Business Central.
Properties
PROPERTY TYPE DESCRIPTION

number string The sequence number of the document


line details.

displayName string The display name of the line.

"documentLineObjectDetails"
{
"number": "string",
"displayName": "string"
}

See also
Working with Dynamics 365 for Financials in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
countriesRegions resource type
3/23/2018 • 1 min to read • Edit Online

Represents a countriesRegions object in Dynamics 365 Business Central, which is part of an address.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET countriesRegions countriesRegions Get a Countries/Regions.

POST countriesRegions countriesRegions Create a Countries/Regions.

PATCH countriesRegions countriesRegions Update a Countries/Regions.

DELETE countriesRegions none Delete a Countries/Regions.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the country/region.


Non-editable.

code string Specifies the code of the


country/region.

displayName string Specifies the display name of the


country/region.

addressFormat string Specifies the format of the address that


is displayed on external-facing
documents. You link an address format
to a country/region code so that
external-facing documents based on
cards or documents with that
country/region code use the specified
address format.

lastModifiedDateTime datetime The last datetime the country/region


was modified. Read-Only.

Relationships
None
JSON representation
Here is a JSON representation of the countriesRegions.

{
"id": "GUID",
"code": "string",
"displayName": "string",
"addressFormat": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Countries Regions
Post Countries Regions
Patch Countries Regions
Delete Countries Regions
Get countriesRegions
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a countries regions object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/countriesRegions({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a countriesRegions object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/countriesRegions({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "US",
"displayName": "USA",
"addressFormat": "City+County+Post Code",
"lastModifiedDateTime": "2017-03-14T15:22:31.753Z"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Countries Regions
Post Countries Regions
Patch Countries Regions
Delete Countries Regions
Create countriesRegions
3/23/2018 • 1 min to read • Edit Online

Create a countriesRegions object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/countriesRegions

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of countriesRegions object.

Response
If successful, this method returns 201 Created response code and a countriesRegions object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/countriesRegions
Content-type: application/json

{
"code": "US",
"displayName": "USA",
"addressFormat": "City+County+Post Code"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "US",
"displayName": "USA",
"addressFormat": "City+County+Post Code",
"lastModifiedDateTime": "2017-03-14T15:22:31.753Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Countries Regions
Get Countries Regions
Patch Countries Regions
Delete Countries Regions
Update countriesRegions
3/23/2018 • 1 min to read • Edit Online

Update the properties of a country/region object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/countriesRegions({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
countriesRegions, the countriesRegions will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated countriesRegions object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/countriesRegions({id})
Content-type: application/json

{
"displayName": "United States of America"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "US",
"displayName": "United States of America",
"addressFormat": "City+County+Post Code",
"lastModifiedDateTime": "2017-03-16T15:22:31.753Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Countries Regions
Get Countries Regions
Post Countries Regions
Delete Countries Regions
Delete countriesRegions
3/23/2018 • 1 min to read • Edit Online

Delete a countries/regions object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/countriesRegions({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
countriesRegions, the countriesRegions will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/countriesRegions({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Countries Regions
Get Countries Regions
Post Countries Regions
Patch Countries Regions
currencies resource type
3/23/2018 • 1 min to read • Edit Online

Represents a currency used in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET currencies currencies Get a Currency.

POST currencies currencies Create a Currency.

PATCH currencies currencies Update a Currency.

DELETE currencies none Delete a Currency.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the currency. Non-


editable.

code string Specifies the currency code.

displayName string Specifies the currency display name.

symbol string Specifies the symbol for this currency


that appears on checks.

amountDecimalPlaces string Specifies the number of decimal places


the system will display on amounts for
this currency.

amountRoundingPrecision decimal Specifies the size of the interval to be


used when rounding amounts for this
currency.

lastModifiedDateTime datetime The last datetime the currency was


modified. Read-Only.

Relationships
None
JSON representation
Here is a JSON representation of the currencies.

{
"id": "GUID",
"code": "string",
"displayName": "string",
"symbol": "string",
"amountDecimalPlaces": "string",
"amountRoundingPrecision": "decimal",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Currencies
Post Currencies
Patch Currencies
Delete Currencies
Get currencies
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a currency object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/currencies({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a currencies object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/currencies({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "US",
"displayName": "US Dollar",
"symbol": "$",
"amountDecimalPlaces": "2:2",
"amountRoundingPrecision": 0.01,
"lastModifiedDateTime": "2017-03-22T21:05:09.003Z"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Currencies
Post Currencies
Patch Currencies
Delete Currencies
Create currencies
3/23/2018 • 1 min to read • Edit Online

Create a currency object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/currencies

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of currencies object.

Response
If successful, this method returns 201 Created response code and a currencies object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/currencies
Content-type: application/json

{
"code": "US",
"displayName": "US Dollar",
"symbol": "$",
"amountDecimalPlaces": "2:2",
"amountRoundingPrecision": 0.01
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "US",
"displayName": "US Dollar",
"symbol": "$",
"amountDecimalPlaces": "2:2",
"amountRoundingPrecision": 0.01,
"lastModifiedDateTime": "2017-03-22T21:05:09.002Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Currencies
Get Currencies
Patch Currencies
Delete Currencies
Update currencies
3/23/2018 • 1 min to read • Edit Online

Update the properties of a currency object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/currencies({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the currencies,
the currencies will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated currencies object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/currencies({id})
Content-type: application/json

{
"displayName": "United States Dollar"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "US",
"displayName": "United States Dollar",
"symbol": "$",
"amountDecimalPlaces": "2:2",
"amountRoundingPrecision": 0.01,
"lastModifiedDateTime": "2017-03-22T21:12:18.793Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Currencies
Post Currencies
Get Currencies
Delete Currencies
Delete currencies
3/23/2018 • 1 min to read • Edit Online

Delete a currency object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/currencies({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the currencies,
the currencies will not be

updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/currencies({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Currencies
Post Currencies
Patch Currencies
Get Currencies
customers resource type
3/23/2018 • 2 min to read • Edit Online

Represents a customer in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET customers customers Gets a customer.

CREATE customers customers Creates a customer.

UPDATE customers customers Updates a customer.

DELETE customers none Deletes a customer.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the item. Non-


editable.

number string The customer number.

displayName string Specifies the customer's name. This


name will appear on all sales documents
for the customer.

type string Specifies the type of customer, can be


"Company" or "Person".

address NAV.PostalAddress Specifies the customer's address. This


address will appear on all sales
documents for the customer.

phoneNumber string Specifies the customer's telephone


number.

email string Specifies the customer's email address.

website string Specifies the customer's home page


address.
PROPERTY TYPE DESCRIPTION

taxLiable boolean Specifies if the customer or vendor is


liable for sales tax. Set to true if the
customer is tax liable.

taxAreaId GUID Specifies which tax area the customer


belongs to.

taxAreaDisplayName string Specified the display name of the tax


area the customer belongs to.

taxRegistrationNumber string, maximum size 20 Specified the tax registration number of


the customer.

currencyId GUID Specifies which currency the customer


uses.

currencyCode numeric The default currency code for the


customer.

paymentTermsId GUID Specifies which payment term the


customer uses.

paymentTerms NAV.PaymentTermsType Specifies a code that indicates the


payment terms that you require of the
customer.

paymentMethodId GUID Specifies which payment method the


customer uses.

paymentMethod NAV.PaymentMethod Specifies how the customer usually


submits payment, such as bank transfer
or check.

shipmentMethodId GUID Specifies which shipment method the


customer uses.

shipmentMethod NAV.ShipmentMethod Specifies which shipment method to use


when you ship items to the customer.

blocked string Specifies that transactions with the


customer cannot be posted. Set to All,
if the customer is blocked, set to blank
if not blocked.

balance numeric Specifies the payment amount that the


customer owes for completed sales. This
value is also known as the customer's
balance. Read-Only.

overdueAmount numeric Specifies the customer's overdue


amount.

totalSalesExcludingTax numeric Specifies the total sales amount


excluding tax of the customer.
PROPERTY TYPE DESCRIPTION

lastModifiedDateTime datetime The last datetime the customer was


modified. Read-Only.

Relationships
A Currency(currencyCode) must exist in the Currencies table.
A Payment Term(paymentTerms) must exist in the Payment Terms table.
A Shipment Method(shipmentMethod) must exist in the Shipment Method table.
A Payment Method(paymentMethod) must exist in the Payment Method table.
A Tax Area(taxArea) must exist in the Tax Area table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"displayName": "string",
"type": "string",
"address": NAV.PostalAddress,
"phoneNumber": "string",
"email": "string",
"website": "string",
"taxLiable": "boolean",
"taxAreaId": "GUID",
"taxAreaDisplayName": "string",
"taxRegistrationNumber": "string",
"currencyCode": "string",
"paymentTerms": NAV.PaymentTermsType,
"shipmentMethod": NAV.ShipmentMethod,
"paymentMethod": NAV.PaymentMethod,
"blocked": "string",
"balance": "decimal",
"overdueAmount": "numeric",
"totalSalesExcludingTax": "numeric",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Customers
Post Customers
Patch Customers
Delete Customers
Get customers
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a customer object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/customers({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a customers object in the response body.
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customers({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "10000",
"displayName": "Coho Winery",
"type": "Company",
"address": {
"street": "192 Market Square",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "jim.glynn@cronuscorp.net",
"website": "",
"taxLiable": true,
"taxAreaId": "taxAreaId-value",
"taxAreaDisplayName": "tax area",
"taxRegistrationNumber": "28012001T",
"currencyId": "currencyId-value",
"currencyCode": "USD",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": {
"code": "1M(8D)",
"description": "1 Month/2% 8 days"
},
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": null,
"paymentMethodId": "paymentMethodId-value",
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"blocked": " ",
"balance": 0,
"overdueAmount": 0,
"totalSalesExcludingTax": 0,
"lastModifiedDateTime": "2017-03-07T00:35:28.983Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer
Post Customers
Patch Customers
Delete Customers
Create customers
3/23/2018 • 1 min to read • Edit Online

Create a customer object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/customers

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of customers object.

Response
If successful, this method returns 201 Created response code and a customers object in the response body.

Example
Request
Here is an example of a request.
POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customers
Content-type: application/json

{
"number": "10000",
"displayName": "Coho Winery",
"type": "Company",
"address": {
"street": "192 Market Square",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "jim.glynn@cronuscorp.net",
"website": "",
"taxLiable": true,
"taxAreaId": "taxAreaId-value",
"taxAreaDisplayName": "tax area",
"taxRegistrationNumber": "28012001T",
"currencyId": "currencyId-value",
"currencyCode": "USD",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": {
"code": "1M(8D)",
"description": "1 Month/2% 8 days"
},
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": null,
"paymentMethodId": "paymentMethodId-value",
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"blocked": " ",
"overdueAmount": 0,
"totalSalesExcludingTax": 0,
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"number": "10000",
"displayName": "Coho Winery",
"type": "Company",
"address": {
"street": "192 Market Square",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "jim.glynn@cronuscorp.net",
"website": "",
"taxLiable": true,
"taxAreaId": "taxAreaId-value",
"taxAreaDisplayName": "tax area",
"taxRegistrationNumber": "28012001T",
"currencyCode": "USD",
"paymentTerms": {
"code": "1M(8D)",
"description": "1 Month/2% 8 days"
},
"shipmentMethod": null,
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"blocked": " ",
"balance": 0,
"overdueAmount": 0,
"totalSalesExcludingTax": 0,
"lastModifiedDateTime": "2017-03-07T00:35:28.983Z"
}

See Also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer
Get Customers
Patch Customers
Delete Customers
Update customers
3/23/2018 • 1 min to read • Edit Online

Update the properties of a customer object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/customers({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the customers,
the customers will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated customers object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customers({id})
Content-type: application/json

{
"displayName": "Coho Winery Inc.",
"phoneNumber": "(555) 555-1234"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "10000",
"displayName": "Coho Winery Inc.",
"type": "Company",
"address": {
"street": "192 Market Square",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "(555) 555-1234"
"email": "jim.glynn@cronuscorp.net",
"website": "",
"taxLiable": true,
"taxAreaId": "taxAreaId-value",
"taxAreaDisplayName": "tax area",
"taxRegistrationNumber": "28012001T",
"currencyId": "currencyId-value",
"currencyCode": "USD",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": {
"code": "1M(8D)",
"description": "1 Month/2% 8 days"
},
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": null,
"paymentMethodId": "paymentMethod-value",
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"blocked": " ",
"balance": 0,
"overdueAmount": 0
"totalSalesExcludingTax": 0,
"lastModifiedDateTime": "2017-03-07T00:35:28.983Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer
Get Customers
Post Customers
Delete Customers
Delete customers
3/23/2018 • 1 min to read • Edit Online

Delete a customer object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/customers({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the customers,
the customers will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customers({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer
Get Customers
Post Customers
Patch Customers
customerPayments resource type
3/23/2018 • 1 min to read • Edit Online

Represents a customer payment in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET customerPayments customerPayments Gets a customer payment.

POST customerPayments customerPayments Creates a customer payment.

PATCH customerPayments customerPayments Updates a customer payment.

DELETE customerPayments none Deletes a customer payment.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the customer


payment. Non-editable.

lineNumber integer The number of the customer payment.

customerId GUID The unique ID of the customer that the


payment is related to.

customerNumber string, maximum size 20 The number of the customer that the
payment is related to.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

postingDate date The date that the customer payment is


posted.

documentNumber string, maximum size 20 Specifies a document number for the


customer payment.

externalDocumentNumber string, maximum size 20 Specifies an external document number


for the customer payment.
PROPERTY TYPE DESCRIPTION

amount decimal Specifies the total amount (including


VAT) that the customer payment
consists of.

appliesToInvoiceId GUID The unique ID of the invoice that the


payment is related to.

appliesToInvoiceNumber string, maximum size 20 The number of the invoice that the
payment is related to.

description string, maximum size 50 The description of the customer


payment, provided by the user or
autocreated.

comment string, maximum size 250 A user specified comment on the


customer payment.

lastModifiedDateTime datetime The last datetime the customer


payment was modified. Read-Only.

Relationships
A customer payment is a subpage of a customer payments journal. It cannot be accessed directly.
A customer payment can be a "Parent Entity" of the dimension lines.
A Customer (customerId) must exist in the Customers table.
An Invoice (appliesToInvoiceId) must exist in the Sales Invoices Table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"lineNumber": "integer",
"customerId": "GUID",
"customerNumber": "string",
"contactId": "string",
"postingDate": "date",
"documentNumber": "string",
"externalDocumentNumber": "string",
"amount": "decimal",
"appliesToInvoiceId": "GUID",
"appliesToInvoiceNumber": "string",
"description": "string",
"comment": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Customer Payments
Post Customer Payments
Patch Customer Payments
Delete Customer Payments
Get customerPayments
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a customer payment object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/customerPaymentsJournals({id})/customerPayments({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a customerPayments object in the response body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})/customer
Payments({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"lineNumber": 10000,
"customerId": "customerId-value",
"customerNumber": "10400",
"contactId": "string",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": 1500,
"appliesToInvoiceId": "appliesToInvoiceId-value",
"appliesToInvoiceNumber": "100000",
"description": "",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments
Post Customer Payments
Patch Customer Payments
Delete Customer Payments
Create customerPayments
3/23/2018 • 1 min to read • Edit Online

Creates a customer payment object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/customerPaymentsJournals({id})/customerPayments({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of customerPayments object.

Response
If successful, this method returns 201 Created response code and a customerPayments object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPayment
Content-type: application/json

{
"lineNumber": 10000,
"customerId": "customerId-value",
"customerNumber": "10400",
"contactId": "contactId-value",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": -1500,
"appliesToInvoiceId": "appliesToInvoiceId-value",
"appliesToInvoiceNumber": "100000",
"description": "",
"comment": "",
}

Response
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"journalDisplayName": "DEFAULT",
"lineNumber": 10000,
"customerId": "customerId-value",
"customerNumber": "10400",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": 1500,
"appliesToInvoiceId": "appliesToInvoiceId-value",
"appliesToInvoiceNumber": "100000",
"description": "Accounts Receivable",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments
Get Customer Payments
Patch Customer Payments
Delete Customer Payments
Update customerPayments
3/23/2018 • 1 min to read • Edit Online

Update the properties of a customer payment object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/customerPaymentsJournals({id})/customerPayments({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
customerPayments, the customerPayments will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated customerPayments object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})/customer
Payments({id})
Content-type: application/json

{
"amount": 2000
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"lineNumber": 10000,
"customerId": "customerId-value",
"customerNumber": "",
"contactId": "contactId-value",
"postingDate": "2015-12-31",
"documentNumber": "D00001",
"externalDocumentNumber": "",
"amount": -2000,
"appliesToInvoiceId": "appliesToInvoiceId-value",
"appliesToInvoiceNumber": "100000",
"description": "",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments
Get Customer Payments
Post Customer Payments
Delete Customer Payments
Delete customerPayments
3/23/2018 • 1 min to read • Edit Online

Delete a customerPayment from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/customerPaymentsJournals({id})/customerPayments({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
customerPayments, the customerPayments will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})/custome
rPayments({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments
Get Customer Payments
Post Customer Payments
Patch Customer Payments
customerPaymentsJournals resource type
3/23/2018 • 1 min to read • Edit Online

Represents a customer payments journal in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET customerPaymentsJournals customerPaymentsJournals Gets a customer payments journal.

POST customerPaymentsJournals customerPaymentsJournals Creates a customer payments journal.

PATCH customerPaymentsJournals customerPaymentsJournals Updates a customer payments journal.

DELETE customerPaymentsJournals none Deletes a customer payments journal.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the customer


payments journal. Non-editable.

code string, maximum size 10 The code of the customer payments


journal.

displayName string, maximum size 50 The display name of the customer


payments journal.

lastModifiedDateTime datetime The last datetime the customer


payments journal was modified. Read-
Only.

Relationships
JSON representation
Here is a JSON representation of the resource.
{
"id": "GUID",
"code": "String",
"displayName": "String",
"lastModifiedDateTime": "datetime"
}

See also
Microsoft Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments Journal
Post Customer Payments Journal
Patch Customer Payments Journal
Delete Customer Payments Journal
Get customerPaymentsJournals
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a customer payment journal object for Dynamics 365 Business
Central.

HTTP request
GET /businesscentral/companies({id})/customerPaymentsJournals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a customerPaymentsJournals object in the
response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "DEFAULT",
"displayName": "Default Journal Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}
See also
Microsoft Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments Journal
Get Customer Payments Journal
Patch Customer Payments Journal
Delete Customer Payments Journal
Create customerPaymentsJournals
3/23/2018 • 1 min to read • Edit Online

Creates a customer payments journal object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/customerPaymentsJournals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of customerPaymentsJournals object.

Response
If successful, this method returns 201 Created response code and a customerPaymentsJournals object in the
response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals
Content-type: application/json

```json
{
"code": "DEFAULT"
}

Response
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "DEFAULT",
"displayName": "Default Journal Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Microsoft Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments Journal
Get Customer Payments Journal
Patch Customer Payments Journal
Delete Customer Payments Journal
Update customerPaymentsJournals
3/23/2018 • 1 min to read • Edit Online

Update the properties of a customer payments journal object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/customerPaymentsJournals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
customerPaymentsJournals, the
customerPaymentsJournals will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated customerPaymentsJournals object
in the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})
Content-type: application/json

{
"code": "EXPENSE",
"displayName": "Expense Batch"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "EXPENSE",
"displayName": "Expense Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Microsoft Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments Journal
Get Customer Payment Journal
Post Customer Payments Journal
Delete Customer Payments Journal
Delete customerPaymentsJournals
3/23/2018 • 1 min to read • Edit Online

Delete a customer payment journal object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/customerPaymentsJournals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
customerPaymentsJournals, the
customerPaymentsJournals will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerPaymentsJournals({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Microsoft Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Payments Journal
Get Customer Payments Journal
Post Customer Payments Journal
Patch Customer Payments Journal
customerSales resource type
3/23/2018 • 1 min to read • Edit Online

Represents an customer sales in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET customerSales CustomerSales Get a customer sales object

Properties
PROPERTY TYPE DESCRIPTION

customerId GUID Represents the customer ID.

customerNumber string Represents the customer number.

name string Represents the name of the customer.

totalSalesAmount numeric Represents the customer sales.

dateFilter_FilterOnly date Represents the date filter for the


customer sales.

Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"customerId": "GUID",
"customerNumber": "string",
"name": "string",
"totalSalesAmount": "decimal",
"dateFilter_FilterOnly": "date"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Customer Sales
Get customerSales
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a customer sales report object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/customerSales

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a customerSales object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/customerSales

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"customerId": "id-value",
"customerNumber": "50000",
"name": "Relecloud",
"totalSalesAmount": 83956.45,
"dateFilter_FilterOnly": null
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Customer Sales
Dimensions resource type
3/23/2018 • 1 min to read • Edit Online

Represents a dimension in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET dimensions dimension Gets a dimension.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the item.

code string, maximum size 20 The dimension code.

displayName string Specifies the dimension's name. This


name will appear where the dimension
is used.

lastModifiedDateTime datetime The last datetime the dimension was


modified.

JSON representation
Here is a JSON representation of the resource.

"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Dimensions
Get dimensions
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a dimensions object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/dimensions({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a dimensions object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensions({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "AREA",
"displayName": "Area",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension
dimensionLines resource type
3/23/2018 • 1 min to read • Edit Online

Represents a dimension line in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET dimensionLines dimensionLines Gets a dimension line object

POST dimensionLines dimensionLines Creates a dimension line object

PATCH dimensionLines dimensionLines Updates a dimension line object

DELETE dimensionLines none Deletes a dimension line object

Properties
PROPERTY TYPE DESCRIPTION

parentId GUID The ID of the parent entity. Non


editable.

id GUID The unique ID of the dimension line.


Non editable.

code string, maximum size 20 The code of the dimension.

displayName string, maximum size 30 The display name of the dimension.


Read-Only.

valueId GUID The unique ID of the value of the


dimension.

valueCode string, maximum size 20 The code of the value of the dimension.

valueDisplayName string, maximum size 50 The display name of the value of the
dimension. Read-Only.

Relationships
A dimension line must have a "Parent Entity" with an Id, that is represented by the parent Id. "Parent Entity" can be
one of the following: 1) Journal Line 2) Customer Payment.
A Dimension (id) must exist in the Dimensions endpoint.
A Dimension Value (valueId) must exist in the Dimension Values endpoint.

JSON representation
Here is a JSON representation of the resource.

{
"parentId": "GUID",
"id": "GUID",
"code": "String",
"displayName": "String",
"valueId": "GUID",
"valueCode": "String",
"valueDisplayName": "String"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Dimension Line
Post Dimension Line
Patch Dimension Line
Delete Dimension Line
Get dimensionLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a dimension line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
If you want to receive all of the dimension lines of a specific parent entity, you can do it with the following URL:

GET /businesscentral/companies({id})/dimensionLines?$filter=parentId eq ({id})

In order to get a specific dimension line, you can use the following URL:

GET /businesscentral/companies({id})/dimensionLines(parentId=({id}),id=({id}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a dimensionLines object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensionLines(parentId=({id}),id=
({id}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"parentId": "id-value",
"id": "id-value",
"code": "DEPARTMENT",
"displayName": "Department",
"valueId": "id-value",
"valueCode": "SALES",
"valueDisplayName": "Sales"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension Line
Post Dimension Line
Patch Dimension Line
Delete Dimension Line
Create dimensionLines
3/23/2018 • 1 min to read • Edit Online

Create a dimension line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/dimensionLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a dimensionLines object.

Response
If successful, this method returns 201 Created response code and a dimensionLines object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensionLines
Content-type: application/json

{
"parentId" : "parentId-value",
"id" : "id-value",
"code" : "DEPARTMENT",
"valueId" : "valueId-value",
"valueCode" : "SALES"
}

Response
HTTP/1.1 201 Created
Content-type: application/json

{
"parentId" : "parentId-value",
"id" : "id-value",
"code" : "DEPARTMENT",
"displayName": "Department",
"valueId" : "valueId-value",
"valueCode" : "SALES",
"valueDisplayName": "Production"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension Line
Get Dimension Line
Patch Dimension Line
Delete Dimension Line
Update dimensionLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a dimension line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/dimensionLines(parentId=({id}),id=({id}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
dimensionLines, the dimensionLines will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated dimensionLines object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensionLines(parentId=
({id}),id=({id}))
Content-type: application/json

{
"valueCode": "PROD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"parentId": "id-value",
"id": "id-value",
"code": "DEPARTMENT",
"displayName": "Department",
"valueId": "id-value",
"valueCode": "PROD",
"valueDisplayName": "Production"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension Line
Get Dimension Line
Post Dimension Line
Delete Dimension Line
Delete dimensionLines
3/23/2018 • 1 min to read • Edit Online

Delete a dimension line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/dimensionLines(parentId=({id}),id=({id}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
dimensionLines, the dimensionLines will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensionLines(parentId=
({id}),id=({id}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension Line
Get Dimension Line
Post Dimension Line
Patch Dimension Line
dimensionValues resource type
3/23/2018 • 1 min to read • Edit Online

Represents a dimension value in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET dimensionValues dimensionValues Gets a dimension value object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the item.

code string, maximum size 20 The dimension value code.

displayName string Specifies the dimension value's name.


This name will appear where the
dimension value is used.

lastModifiedDateTime datetime The last datetime the dimension value


was modified.

JSON representation
Here is a JSON representation of the resource.

"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Dimension Value
Get dimensionValues
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a dimension value object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/dimensions({id})/dimensionValues({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a dimensionValues object in the response body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/dimensions({id})/dimensionValues({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"code": "30",
"displayName": "Europe North (EU)",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Dimension Value
employees resource type
3/23/2018 • 1 min to read • Edit Online

Represents an employee in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET employees employees Get an employee object.

POST employees employees Create an employee object.

PATCH employees employees Update an employee object.

DELETE employees none Delete an employee object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The employee ID. Non-editable.

number string The employee number. Read-Only.

displayName string The employee givenName + surname.


Read-Only.

givenName string The given name of the employee.

middleName string The middle name of the employee.

surname string The surname of the employee

jobTitle string The full name of the employee

address NAV.PostalAddress Specifies the employee's address. This


address will appear on all resource
documents for the employee.

phoneNumber string Specifies the employee's telephone


number.
PROPERTY TYPE DESCRIPTION

mobilePhone string Specifies the employee's mobile


telephone number.

email string Specifies the employee's email address.

personalEmail string Specifies the employee's personal email


address.

employmentDate date Specifies the date when the employee


began to work for the company.

terminationDate date Specifies the date when the employee


was terminated, due to retirement or
dismissal, for example.

status string Specifies the employee's status. Possible


values are Active, Inactive or Terminated

birthDate date Specifies the employee's date of birth.

picture stream The employee picture. Read-Only.

lastModifiedDateTime datetime The last datetime the employee was


modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"displayName": "string",
"givenName": "string",
"middleName": "string",
"surname": "string",
"jobTitle": "string",
"address": "NAV.PostalAddress",
"phoneNumber": "string",
"mobilePhone": "string",
"email": "string",
"personalEmail": "string",
"employmentDate": "date",
"terminationDate": "date",
"status": "string",
"birthDate": "date",
"picture": "stream",
"lastModifiedDateTime": "datetime"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Employee
Post Employee
Patch Employee
Delete Employee
Get employees
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an employee object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/employees({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an employees object in the response body.
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/employees({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "AH",
"displayName": "Annette Hill",
"givenName": "Annette",
"middleName": "",
"surname": "Hill",
"jobTitle": "Secretary",
"address": {
"street": "677 Fifth Avenue",
"city": "New York",
"state": "",
"countryLetterCode": "",
"postalCode": "10022"
},
"phoneNumber": "4465-4899-4643",
"mobilePhone": "4564-4564-7831",
"email": "",
"personalEmail": "ah@cronus-demosite.com",
"employmentDate": "2001-06-01",
"terminationDate": "0001-01-01",
"status": "Active",
"birthDate": "1973-12-12",
"picture@odata.mediaReadLink":
"https://api.financials.dynamics.com/v1.0/api/beta/companies({id})/employees({id})/picture",
"lastModifiedDateTime": "2017-03-16T14:57:19.497Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Employee
Post Employee
Patch Employee
Delete Employee
Create employees
3/23/2018 • 1 min to read • Edit Online

Create an employee object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/employees

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of an employees object.

Response
If successful, this method returns 201 Created response code and an employees object in the response body.

Example
Request
Here is an example of a request.
POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/employees
Content-type: application/json

{
"id": "id-value",
"number": "AH",
"givenName": "Annette",
"surname": "Hill",
"jobTitle": "Production Assistant",
"address": {
"street": "677 Fifth Avenue",
"city": "New York",
"state": "",
"countryLetterCode": "",
"postalCode": "10022"
},
"phoneNumber": "4465-4899-4643",
"mobilePhone": "4564-4564-7831",
"personalEmail": "ah@cronus-demosite.com",
"employmentDate": "2001-06-01",
"birthDate": "1973-12-12"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"number": "AH",
"displayName": "Annette Hill",
"givenName": "Annette",
"middleName": "",
"surname": "Hill",
"jobTitle": "Secretary",
"address": {
"street": "677 Fifth Avenue",
"city": "New York",
"state": "",
"countryLetterCode": "",
"postalCode": "10022"
},
"phoneNumber": "4465-4899-4643",
"mobilePhone": "4564-4564-7831",
"email": "",
"personalEmail": "ah@cronus-demosite.com",
"employmentDate": "2001-06-01",
"terminationDate": "0001-01-01",
"status": "Active",
"birthDate": "1973-12-12",
"picture@odata.mediaReadLink":
"https://api.financials.dynamics.com/v1.0/api/beta/companies({id})/employees({id})/picture",
"lastModifiedDateTime": "2017-03-16T14:57:19.497Z"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Employee
Get Employee
Patch Employee
Delete Employee
Update employees
3/23/2018 • 1 min to read • Edit Online

Update the properties of an employee object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/employees({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the employees,
the employees will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated employees object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/employees({id})
Content-type: application/json

{
"givenName": "Anthony",
"phoneNumber": "0678-8712-3455"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "AH",
"displayName": "Anthony Hill",
"givenName": "Anthony",
"middleName": "",
"surname": "Hill",
"jobTitle": "Secretary",
"address": {
"street": "677 Fifth Avenue",
"city": "New York",
"state": "",
"countryLetterCode": "",
"postalCode": "10022"
},
"phoneNumber": "0678-8712-3455",
"mobilePhone": "4564-4564-7831",
"email": "",
"personalEmail": "ah@cronus-demosite.com",
"employmentDate": "2001-06-01",
"terminationDate": "0001-01-01",
"status": "Active",
"birthDate": "1973-12-12",
"picture@odata.mediaReadLink":
"https://api.financials.dynamics.com/v1.0/api/beta/companies({id})/employees({id})/picture",
"lastModifiedDateTime": "2017-03-16T14:57:19.497Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Employee
Get Employee
Post Employee
Delete Employee
Delete employees
3/23/2018 • 1 min to read • Edit Online

Delete an employee from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/employees({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the employees,
the employees will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/employees({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Employee
Get Employee
Post Employee
Patch Employee
generalLedgerEntries resource type
3/23/2018 • 1 min to read • Edit Online

Represents a generalLedgerEntry object in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET generalLedgerEntries generalLedgerEntries Get a G/L entry object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the G/L Entry.

number numeric Specifies the number of the G/L Entry.

postingDate date Specifies the posting date of the G/L


Entry.

documentNumber string, maximum size 20 Specifies the document number of the


G/L Entry.

documentType string Specifies the document type of the G/L


Entry.

accountId GUID Specifies the accountId of the G/L Entry.

accountNumber string, maximum size 20 Specifies the accountNumber of the G/L


Entry.

description string, maximum size 50 Specifies the description of the G/L


Entry.

debitAmount numeric Specifies the debitAmount of the G/L


Entry.

creditAmount numeric Specifies the creditAmount of the G/L


Entry.

lastModifiedDateTime datetime The last datetime the G/L Entry was


modified.
Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "int",
"postingDate": "Date",
"documentNumber": "string",
"documentType": "string",
"accountId": "GUID",
"accountNumber": "string",
"description": "string",
"debitAmount": "decimal",
"creditAmount": "decimal",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
General Ledger Entries
Get General Ledger Entries
Get generalLedgerEntries
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a general ledger entry object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/generalLedgerEntries({id})

Request headers
HEADER VALUE

Authorization Bearer. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a generalLedgerEntries object in the response
body.

Example
Request
Here is an example of the request.

GET https://graph.microsoft.com/beta/businesscentral/companies({id})/generalLedgerEntries({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "10700",
"postingDate": "2017-03-15",
"documentNumber": "108027",
"documentType": "Invoice",
"accountId": "id-value",
"accountNumber": "7210",
"description": "Order 106003",
"debitAmount": 6943.8,
"creditAmount": 0,
"lastModifiedDateTime": "2017-03-15T02:20:58.747Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
General Ledger Entries
incomeStatement resource type
3/23/2018 • 1 min to read • Edit Online

Represents an income statement in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET incomeStatement incomeStatement Get an income statement object.

Properties
PROPERTY TYPE DESCRIPTION

lineNumber numeric The incomeStatement item line number.

display string The incomeStatement item display


name.

netChange numeric The incomeStatement item Net Change.

lineType string The incomeStatement item line type can


be: header, detail, total, or spacer.

indentation numeric The incomeStatement item indentation


used in report layout.

dateFilter date The date filter used to calculate the


incomeStatement items.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"lineNumber": "int",
"display": "string",
"netChange": "decimal",
"lineType": "string",
"indentation": "int",
"dateFilter": "date"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Income Statement
Get incomeStatement
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an income statement report object for Dynamics 365 Business
Central.

HTTP request
GET /businesscentral/companies({id})/incomeStatement

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an incomeStatement object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/incomeStatement?
$orderby=lineNumber&$filter=dateFilter ge 2019-01-01 and dateFilter le 2020-12-31

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"lineNumber": 30000,
"display": "Income, Product Sales",
"netChange": 483040.25,
"lineType": "detail",
"indentation": 1,
"dateFilter": "2016-12-31"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Income Statement
irs1099Codes resource type
3/23/2018 • 1 min to read • Edit Online

Represents an irs1099Codes object in Dynamics 365 Business Central. IRS 1099 codes are used for reporting to
the IRS.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET irs1099Codes irs1099Codes Gets an IRS 1099 code.

POST irs1099Codes irs1099Codes Creates an IRS 1099 code.

PATCH irs1099Codes irs1099Codes Update an IRS 1099 code.

DELETE irs1099Codes none Delete an IRS 1099 code.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the IRS 1099 Code.


Non-editable.

code string Specifies the IRS 1099 Code.

displayName string Specifies the IRS 1099 Code display


name.

minimumReportable decimal Specifies the minimum value for this


box that must be reported to the IRS
on a 1099 form.

lastModifiedDateTime datetime The last datetime the IRS 1099 Code


was modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the irs1099Codes.
{
"id": "GUID",
"code": "string",
"displayName": "string",
"minimumReportable": "decimal",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get IRS 1099
Post IRS 1099
Patch IRS 1099
Delete IRS 1099
Get irs1099Codes
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an IRS 1099 codes object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/irs1099Codes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an irs1099Codes object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/irs1099Codes({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "R-10",
"displayName": "State income tax withheld",
"minimumReportable": 0,
"lastModifiedDateTime": "0001-01-01T00:00:00Z"
}
See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
IRS 1099
Post IRS 1099
Patch IRS 1099
Delete IRS 1099
Create irs1099Codes
3/23/2018 • 1 min to read • Edit Online

Create an IRS 1099 code object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/irs1099Codes

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of an irs1099Codes object.

Response
If successful, this method returns 201 Created response code and an irs1099Codes object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/irs1099Codes
Content-type: application/json

{
"code": "R-10",
"displayName": "State income tax withheld",
"minimumReportable": 0
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "R-10",
"displayName": "State income tax withheld",
"minimumReportable": 0,
"lastModifiedDateTime": "0001-01-01T00:00:00Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
IRS 1099
Get IRS 1099
Patch IRS 1099
Delete IRS 1099
Update irs1099Codes
3/23/2018 • 1 min to read • Edit Online

Update the properties of an IRS 1099 codes object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/irs1099Codes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
irs1099Codes, the irs1099Codes will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated irs1099Codes object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/irs1099Codes({id})
Content-type: application/json

{
"minimumReportable": 250
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "R-10",
"displayName": "State income tax withheld",
"minimumReportable": 250,
"lastModifiedDateTime": "0001-01-01T00:00:00Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
IRS 1099
Get IRS 1099
Post IRS 1099
Delete IRS 1099
Delete irs1099Codes
3/23/2018 • 1 min to read • Edit Online

Delete a irs1099Codes object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/irs1099Codes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
irs1099Codes, the irs1099Codes will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/irs1099Codes({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
IRS 1099
Get IRS 1099
Post IRS 1099
Patch IRS 1099
items resource type
3/23/2018 • 1 min to read • Edit Online

Represents an item in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET items items Gets an item object.

POST items items Creates an item object.

PATCH item items Updates an item object.

DELETE items none Deletes an item object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the item. Non-


editable.

number string The item number.

displayName string Specifies a description of the item.

type numeric The inventory type for the item. 1 =


inventory item, 2 = service item. This is
a required property.

blocked boolean Specifies that transactions with the item


cannot be posted, for example, because
the item is in quarantine. Set to true, if
item is blocked.

baseUnitOfMeasureId GUID Specifies the ID of the unit of measure.

baseUnitOfMeasure NAV.UnitOfMeasure Specifies the unit in which the item is


held in inventory.

gtin numeric This is the Global Trade Item Number.


PROPERTY TYPE DESCRIPTION

itemCategory NAV.ItemCategory Specifies the category that the item


belongs to. Item categories also contain
any assigned item attributes.

inventory decimal Specifies how many units, such as


pieces, boxes, or cans, of the item are in
inventory. Read-Only.

unitPrice decimal Specifies the price for one unit of the


item in the specified currency.

priceIncludesTax boolean Specifies that the unitPrice includes tax.


Set to true, if unitPrice includes tax.

unitCost decimal Specifies the cost per unit of the item.

taxGroupId GUID Specifies the ID of the Tax Group for the


item.

taxGroupCode numeric A Tax Group represents a group of


inventory items or resources that are
subject to identical tax terms.

lastModifiedDateTime datetime The last datetime the item was


modified. Read-Only.

Relationships
A Tax Group(taxGroupCode) must exist in the Tax Group table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"displayName": "string",
"type": "string",
"blocked": "boolean",
"baseUnitOfMeasureId": "GUID",
"baseUnitOfMeasure": "NAV.UnitOfMeasure",
"gtin": "numeric",
"itemCategory": "NAV.ItemCategory",
"inventory": "decimal",
"unitPrice": "decimal",
"priceIncludesTax": "boolean",
"unitCost": "decimal",
"taxGroupId": "GUID",
"taxGroupCode": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item
Get Item
Post Item
Patch Item
Delete Item
Get items
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an item object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/items({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an items object in the response body.

Example
Request
Here is an example of the request.

GET https://graph.microsoft.com/v1.0/businesscentral/companies({id})/items({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1896-S",
"displayName": "ATHENS Desk",
"type": "Inventory",
"blocked": false,
"baseUnitOfMeasureId": "id-value",
"baseUnitOfMeasure": {
"unitCode": "PCS",
"unitName": "Piece",
"symbol": "",
"unitConversion": null
},
"gtin": "",
"itemCategory": {
"categoryId": "TABLE",
"description": "Assorted Tables"
},
"inventory": 0,
"unitPrice": 1000.8,
"priceIncludesTax": false,
"unitCost": 780.7,
"taxGroupId": "id-value",
"taxGroupCode": "FURNITURE",
"lastModifiedDateTime": "2017-03-07T00:35:30.073Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item
Post Item
Patch Item
Delete Item
Create items
3/23/2018 • 1 min to read • Edit Online

Create an item in Dynamics 365 Business Central for use on invoices, quotes, etc.

HTTP request
POST /businesscentral/companies({id})/items

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of an items object.

Response
If successful, this method returns 201 Created response code and an items object in the response body.

Example
Request
Here is an example of a request.
POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/items
Content-type: application/json

{
"number": "1896-S",
"displayName": "ATHENS Desk",
"type": "Inventory",
"blocked": false,
"baseUnitOfMeasure": {
"unitCode": "PCS",
"unitName": "Piece",
"symbol": "",
"unitConversion": null
},
"gtin": "",
"itemCategory": {
"categoryId": "TABLE",
"description": "Assorted Tables"
},
"inventory": 0,
"unitPrice": 1000.8,
"priceIncludesTax": false,
"unitCost": 780.7,
"taxGroupCode": "FURNITURE"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"number": "1896-S",
"displayName": "ATHENS Desk",
"lastModifiedDateTime": "2015-11-09T02:14:32Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item
Get Item
Patch item
Delete Item
Update items
3/23/2018 • 1 min to read • Edit Online

Update the properties of an item object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/items({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the items, the
items will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated items object in the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/items({id})
Content-type: application/json

{
"displayName": "ATHENS Desk - blocked",
"blocked": true
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1896-S",
"displayName": "ATHENS Desk - blocked",
"type": "Inventory",
"blocked": true,
"baseUnitOfMeasureId": "id-value",
"baseUnitOfMeasure": {
"unitCode": "PCS",
"unitName": "Piece",
"symbol": "",
"unitConversion": null
},
"gtin": "",
"itemCategory": {
"categoryId": "TABLE",
"description": "Assorted Tables"
},
"inventory": 0,
"unitPrice": 1000.8,
"priceIncludesTax": false,
"unitCost": 780.7,
"taxGroupId": "id-value",
"taxGroupCode": "FURNITURE",
"lastModifiedDateTime": "2017-03-07T00:35:30.073Z"
}

See also.
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item
Get Item
Post Item
Delete Item
Delete items
3/23/2018 • 1 min to read • Edit Online

Delete an item from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/items({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the items, the
items will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/items({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item
Get Item
Post Item
Patch Item
itemCategories resource type
3/23/2018 • 1 min to read • Edit Online

Represents a category for a number of items in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET itemCategories itemCategories Get an item category.

POST itemCategories itemCategories Create an item category.

PATCH itemCategories itemCategories Update an item category.

DELETE itemCategories none Delete an item category.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the itemCategory.


Non-editable.

code string The itemCategory code.

displayName string The itemCategories display name.

lastModifiedDateTime datetime The last datetime the itemCategory was


modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the itemCategories.
{
"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Item Categories
Create Item Categories
Update Item Categories
Delete Item Categories
Get itemCategories
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of an item category object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/itemCategories({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and an itemCategories object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/itemCategories({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "CHAIR",
"displayName": "Office Chair",
"lastModifiedDateTime": "2017-03-15T02:21:24.047Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item Categories
Create Item Categories
Update Item Categories
Delete Item Categories
Create itemCategories
3/23/2018 • 1 min to read • Edit Online

Create an item category object Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/itemCategories

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of an itemCategories object.

Response
If successful, this method returns 201 Created response code and an itemCategories object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/itemCategories
Content-type: application/json

{
"code": "CHAIR",
"displayName": "Office Chair"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "CHAIR",
"displayName": "Office Chair",
"lastModifiedDateTime": "2017-03-15T02:21:24.047Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item Categories
Get Item Categories
Update Item Categories
Delete Item Categories
Update itemCategories
3/23/2018 • 1 min to read • Edit Online

Update the properties of an item category object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/itemCategories({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
itemCategories, the itemCategories will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated itemCategories object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/itemCategories({id})
Content-type: application/json

{
"displayName": "Office Chair - swivel"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "CHAIR",
"displayName": "Office Chair - swivel",
"lastModifiedDateTime": "2017-03-15T02:21:24.047Z"
}

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item Categories
Get Item Categories
Create Item Categories
Delete Item Categories
Delete itemCategories
3/23/2018 • 1 min to read • Edit Online

Delete an itemCategory from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/itemCategories({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
itemCategories, the itemCategories will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/itemCategories({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Item Categories
Get Item Categories
Create Item Categories
Update Item Categories
journal resource type
3/23/2018 • 1 min to read • Edit Online

Represents a journal in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET journal journal Gets a journal.

POST journal journal Creates a journal.

PATCH journal journal Updates a journal.

DELETE journal none Deletes a journal.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the journal. Non-


editable.

code string, maximum size 10 The code of the journal.

displayName string, maximum size 50 The display name of the journal.

lastModifiedDateTime datetime The last datetime the journal was


modified. Read-Only.

Relationships
JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Journal
Create Journal
Update Journal
Delete Journal
Get journals
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a journal object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/journals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a journals object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "DEFAULT",
"displayName": "Default Journal Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal
Create Journal
Update Journal
Delete Journal
Create journals
3/23/2018 • 1 min to read • Edit Online

Creates a journal in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/journals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a journals object.

Response
If successful, this method returns 201 Created response code and a journals object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals
Content-type: application/json

```json
{
"code": "DEFAULT"
}

Response

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"code": "DEFAULT",
"displayName": "Default Journal Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal
Get Journal
Update Journal
Delete Journal
Update journals
3/23/2018 • 1 min to read • Edit Online

Update the properties of a journal object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/journals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the journals, the
journals will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated journals object in the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})
Content-type: application/json

{
"code": "EXPENSE",
"displayName": "Expense Batch"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "EXPENSE",
"displayName": "Expense Batch",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal
Get Journal
Create Journal
Delete Journal
Delete journals
3/23/2018 • 1 min to read • Edit Online

Delete a journal from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/journals({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the journals, the
journals will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal
Get Journal
Create Journal
Update Journal
journalLines resource type
3/23/2018 • 1 min to read • Edit Online

Represents a line in a journal in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET journalLines journalLines Gets a journal line.

POST journalLines journalLines Creates a journal line.

PATCH journalLines journalLines Updates a journal line.

DELETE journalLines none Deletes a journal line.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the journal line. Non-


editable.

journalDisplayName string, maximum size 10 The display name of the journal that
this line belongs to. Read-Only.

lineNumber integer The number of the journal line.

accountId GUID The unique ID of the account that the


journal line is related to.

accountNumber string, maximum size 20 The number of the account that the
journal line is related to.

postingDate date The date that the journal line is posted.

documentNumber string, maximum size 20 Specifies a document number for the


journal line.

externalDocumentNumber string, maximum size 20 Specifies an external document number


for the journal line.

amount decimal Specifies the total amount (including


VAT) that the journal line consists of.
PROPERTY TYPE DESCRIPTION

description string, maximum size 50 The description of the journal line,


provided by the user or autocreated.

comment string, maximum size 250 A user specified comment on the


journal line.

lastModifiedDateTime datetime The last datetime the journal line was


modified. Read-Only.

Relationships
A journal line is a subpage of a journal. It cannot be accessed directly.
A journal line can be a "Parent Entity" of the dimension lines.
An Account (accountId) must exist in the Accounts table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"journalDisplayName": "string",
"lineNumber": "integer",
"accountId": "GUID",
"accountNumber": "string",
"postingDate": "date",
"documentNumber": "string",
"externalDocumentNumber": "string",
"amount": "decimal",
"description": "string",
"comment": "string",
"lastModifiedDateTime": "datetime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal Line
Get Journal Line
Create Journal Line
Update Journal Line
Delete Journal Line
Get journalLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a journal line object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/journals({id})/journalLines({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a journalLines object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})/journalLines({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"journalDisplayName": "DEFAULT",
"lineNumber": 10000,
"accountId": "id-value",
"accountNumber": "10400",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": 1500,
"description": "Accounts Receivable",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal Line
Create Journal Line
Update Journal Line
Delete Journal Line
Create journalLines
3/23/2018 • 1 min to read • Edit Online

Creates a journal line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/journals({id})/journalLines({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of journalLines object.

Response
If successful, this method returns 201 Created response code and journalLines object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})/journalLines
Content-type: application/json

{
"lineNumber": 10000,
"accountId": "id-value",
"accountNumber": "10400",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": 1500,
"description": "Accounts Receivable",
"comment": ""
}

Response
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"journalDisplayName": "DEFAULT",
"lineNumber": 10000,
"accountId": "id-value",
"accountNumber": "10400",
"postingDate": "2015-12-31",
"documentNumber": "1234",
"externalDocumentNumber": "",
"amount": 1500,
"description": "Accounts Receivable",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal Line
Get Journal Line
Update Journal Line
Delete Journal Line
Update journalLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a journal lines object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/journals({id})/journalLines({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
journalLines, the journalLines will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated journalLines object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})/journalLines({id})
Content-type: application/json

{
"amount": 2000
}

Response
HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"journalDisplayName": "DEFAULT",
"lineNumber": 10000,
"accountId": "",
"accountNumber": "",
"postingDate": "2015-12-31",
"documentNumber": "D00001",
"externalDocumentNumber": "",
"amount": 2000,
"description": "",
"comment": "",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal Line
Get Journal Line
Create Journal Line
Delete Journal Line
Delete journalLines
3/23/2018 • 1 min to read • Edit Online

Delete a journal line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/journals({id})/journalLines({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
journalLines, the journalLines will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/journals({id})/journalLines({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Journal Line
Get Journal Line
Create Journal Line
Update Journal Line
paymentMethods resource type
3/23/2018 • 1 min to read • Edit Online

Represents a method of payment in Dynamics 365 Business Central, such as PayPal, credit card, and bank account.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET paymentMethods paymentMethods Gets a payment method object.

POST paymentMethods paymentMethods Creates a payment method object.

PATCH paymentMethods paymentMethods Updates a payment method object.

DELETE paymentMethods none Deletes a payment method object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the paymentMethods.


Non-editable.

code string Specifies the payment method code.

displayName string Specifies the payment method display


name.

lastModifiedDateTime datetime The last datetime the payment method


was modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the paymentMethods.
{
"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Payment Methods
Create Payment Methods
Update Payment Methods
Delete Payment Methods
Get paymentMethods
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a payment method object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/paymentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a paymentMethods object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentMethods({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

"id": "id-value",
"code": "CHECK",
"displayName": "Check payment",
"lastModifiedDateTime": "2017-03-22T08:35:48.33Z"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Methods
Create Payment Methods
Update Payment Methods
Delete Payment Methods
Create paymentMethods
3/23/2018 • 1 min to read • Edit Online

Create a payment method object in DDynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/paymentMethods

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a paymentMethods object.

Response
If successful, this method returns 201 Created response code and a paymentMethods object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentMethods
Content-type: application/json

{
"code": "CHECK",
"displayName": "Check payment"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "CHECK",
"displayName": "Check payment",
"lastModifiedDateTime": "2017-03-22T08:35:48.33Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Methods
Get Payment Methods
Update Payment Methods
Delete Payment Methods
Update paymentMethods
3/23/2018 • 1 min to read • Edit Online

Update the properties of a payment method object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/paymentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
paymentMethods, the paymentMethods will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated paymentMethods object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentMethods({id})
Content-type: application/json

{
"displayName": "Personal Check Payment",
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "CHECK",
"displayName": "Personal Check Payment",
"lastModifiedDateTime": "2017-03-22T08:35:48.33Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Methods
Get Payment Methods
Create Payment Methods
Delete Payment Methods
Delete paymentMethods
3/23/2018 • 1 min to read • Edit Online

Delete a payment method object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/paymentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
paymentMethods, the paymentMethods will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentMethods({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Methods
Get Payment Methods
Create Payment Methods
Update Payment Methods
paymentTerms resource type
3/23/2018 • 1 min to read • Edit Online

Represents a payment term in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET paymentTerms paymentTerms Get a payment terms object.

POST paymentTerms paymentTerms Create a payment terms object.

PATCH paymentTerms paymentTerms Update a payment terms object.

DELETE paymentTerms none Delete a payment terms object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the paymentTerms.


Non-editable.

code string Specifies the payment term code.

displayName string Specifies the payment term display


name.

dueDateCalculation string Specifies the formula that is used to


calculate the date that a payment must
be made.

discountDateCalculation string Specifies the formula that is used to


calculate the date that a payment must
be made in order to obtain a discount.

discountPercent decimal Specifies the discount percentage that is


applied for early payment of an invoice
amount.

calculateDiscountOnCreditMemos boolean Specifies if the discount should be


applied to credit memos. True indicates
a discount will be given, false indicates
a discount will not be given.
PROPERTY TYPE DESCRIPTION

lastModifiedDateTime datetime The last datetime the paymentTerms


was modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the paymentTerms.

{
"id": "GUID",
"code": "string",
"displayName": "string",
"dueDateCalculation": "string",
"discountDateCalculation": "string",
"discountPercent": "decimal",
"calculateDiscountOnCreditMemos": "boolean",
"lastModifiedDateTime": "datetime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Payment Terms
Create Payment Terms
Update Payment Terms
Delete Payment Terms
Get paymentTerms
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a payment terms object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/paymentTerms({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a paymentTerms object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentTerms({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"code": "7 DAYS",
"displayName": "Net 7 days",
"dueDateCalculation": "7D",
"discountDateCalculation": "",
"discountPercent": 0,
"calculateDiscountOnCreditMemos": false,
"lastModifiedDateTime": "2017-03-15T02:20:55.203Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Terms
Create Payment Terms
Update Payment Terms
Delete Payment Terms
Create paymentTerms
3/23/2018 • 1 min to read • Edit Online

Create a payment terms object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/paymentTerms

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a paymentTerms object.

Response
If successful, this method returns 201 Created response code and a paymentTerms object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentTerms
Content-type: application/json

{
"code": "7 DAYS",
"displayName": "Net 7 days",
"dueDateCalculation": "7D",
"discountDateCalculation": "",
"discountPercent": 0,
"calculateDiscountOnCreditMemos": false
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "7 DAYS",
"displayName": "Net 7 days",
"dueDateCalculation": "7D",
"discountDateCalculation": "",
"discountPercent": 0,
"calculateDiscountOnCreditMemos": false,
"lastModifiedDateTime": "2017-03-03T02:14:32Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Terms
Get Payment Terms
Update Payment Terms
Delete Payment Terms
Update paymentTerms
3/23/2018 • 1 min to read • Edit Online

Update the properties of a payment terms object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/paymentTerms({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
paymentTerms, the paymentTerms will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated paymentTerms object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentTerms({id})
Content-type: application/json

{
"displayName": "Net 7 days with Discount",
"discountPercent": 10
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "7 DAYS",
"displayName": "Net 7 days with Discount",
"dueDateCalculation": "7D",
"discountDateCalculation": "",
"discountPercent": 10,
"calculateDiscountOnCreditMemos": false,
"lastModifiedDateTime": "2017-03-15T02:20:55.203Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Terms
Get Payment Terms
Create Payment Terms
Delete Payment Terms
Delete paymentTerms
3/23/2018 • 1 min to read • Edit Online

Delete a payment terms object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/paymentTerms({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
paymentTerms, the paymentTerms will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/paymentTerms({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Payment Terms
Get Payment Terms
Create Payment Terms
Update Payment Terms
purchaseInvoices resource type
3/23/2018 • 1 min to read • Edit Online

Represents a purchase invoice in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET purchaseInvoices purchaseInvoices Gets a purchase invoice object.

POST purchaseInvoices purchaseInvoices Creates a purchase invoice object.

PATCH purchaseInvoices purchaseInvoices Updates a purchase invoice object.

DELETE purchaseInvoices none Deletes a purchase invoice object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The invoice ID. Read-Only.

number string, maximum size 20 The invoice number. Read-Only.

invoiceDate date The invoice date

dueDate date The date the invoice is due.

vendorInvoiceNumber string, maximum size 35 The vendor sales order reference for the
invoice

vendorId GUID The id of the invoice vendor.

vendorNumber string, maximum size 20 The vendor number for the invoice.

vendorName string, maximum size 50 The full name of the vendor. Read-Only.

buyFromAddress NAV.PostalAddress The vendor's address.

currencyCode string, maximum size 10 The currency code for the invoice.
PROPERTY TYPE DESCRIPTION

status string, maximum size 20 The invoice status. Status can be: Draft,
In Review, Open, Paid, Canceled, or
Corrective. Read-Only.

discountAmount numeric The invoice discount amount

discountAppliedBeforeTax boolean Specifies whether the discount is


applied before tax.

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the invoice.


Read-Only.

totalAmountIncludingTax numeric The total amount for the invoice,


including tax. Read-Only.

pricesIncludeTax boolean Specifies whether the prices include Tax


or not. Read-Only.

paymentTerms string, maximum size 10 The payment terms of the invoice.

shipmentMethod string, maximum size 10 The shipment method of the invoice.

lastModifiedDateTime datetime The last datetime the purchase invoice


was modified. Read-Only.

Relationships
A Currency (currencyCode) must exist in the Currencies table.
A Payment Term (paymentTerms) must exist in the Payment Terms table.
A Shipment Method (shipmentMethod) must exist in the Shipment Method table.
A Vendor (vendorId) must exist in the Vendor table.

JSON representation
Here is a JSON representation of the resource.
{
"id": "GUID",
"number": "string",
"invoiceDate": "Date",
"dueDate": "Date",
"vendorInvoiceNumber": "string",
"vendorId": "GUID",
"vendorNumber": "string",
"vendorName": "string",
"currencyCode": "string",
"status": "string",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"pricesIncludeTax": "boolean",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"buyFromAddress": {NAV.PostalAddress},
"paymentTerms": "string",
"shipmentMethod": "string",
"lastModifiedDateTime": "DateTime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice
Get Purchase Invoice
Create Purchase Invoice
Update Purchase Invoice
Delete Purchase Invoice
Get purchaseInvoices
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a purchase invoice object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/purchaseInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a purchaseInvoices object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"dueDate": "2016-01-31",
"vendorInvoiceNumber": "",
"vendorId": "vendorId-value",
"vendorNumber": "GL00000008",
"vendorName": "GL00000008",
"buyFromAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyCode": "GBP",
"paymentTerms": "COD",
"shipmentMethod": "",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice
Create Purchase Invoice
Update Purchase Invoice
Delete Purchase Invoice
Create purchaseInvoices
3/23/2018 • 1 min to read • Edit Online

Create a purchase invoice report object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/purchaseInvoices

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a purchaseInvoices object.

Response
If successful, this method returns 201 Created response code and a purchaseInvoices object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"vendorNumber": "GL00000008",
"currencyCode": "GBP",
"paymentTerms": "COD"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice
Get Purchase Invoice
Update Purchase Invoice
Delete Purchase Invoice
Update purchaseInvoices
3/23/2018 • 1 min to read • Edit Online

Update the properties of a purchase invoices object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/purchaseInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
purchaseInvoices, the purchaseInvoices will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated purchaseInvoices object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})
Content-type: application/json

{
"paymentTerms": "COD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"dueDate": "2016-01-31",
"vendorInvoiceNumber": "",
"vendorId": "vendorId-value",
"vendorNumber": "GL00000008",
"vendorName": "GL00000008",
"buyFromAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyCode": "GBP",
"paymentTerms": "COD",
"shipmentMethod": "",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice
Get Purchase Invoice
Create Purchase Invoice
Delete Purchase Invoice
Delete purchaseInvoices
3/23/2018 • 1 min to read • Edit Online

Delete a purchase invoice object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/purchaseInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
purchaseInvoices, the purchaseInvoices will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice
Get Purchase Invoice
Create Purchase Invoice
Update Purchase Invoice
salesInvoices resource type
3/23/2018 • 2 min to read • Edit Online

Represents a sales invoice in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesInvoices salesInvoices Gets a sales invoice object.

POST salesInvoices salesInvoices Creates a sales invoice object.

PATCH salesInvoices salesInvoices Updates a sales invoice object.

DELETE salesInvoices none Deletes a sales invoice object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The invoice ID. Non-editable.

number string, maximum size 20 The invoice number. Read-Only.

invoiceDate date The invoice date

customerPurchaseOrderReference string, maximum size 35 The customer purchase order reference


for the invoice

dueDate date The date the invoice is due.

customerNumber string, maximum size 20 The customer number for the invoice.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

customerId GUID The id of the invoice customer.

customerName string, maximum size 50 The full name of the customer. Read-
Only.
PROPERTY TYPE DESCRIPTION

currencyId GUID The id of the invoice currency.

currencyCode string, maximum size 10 The currency code for the invoice.

orderId GUID The unique id of the order to which the


invoice is associated to. Read-Only.

orderNumber string, maximum size 20 The number of the order to which the
invoice is associated to. Read-Only.

status string, maximum size 20 The invoice status. Status can be: Draft,
In Review, Open, Paid, Canceled, or
Corrective. Read-Only.

discountAmount numeric The invoice discount amount

discountAppliedBeforeTax boolean Specifies whether the discount is applied


before tax.

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the invoice.


Read-Only.

totalAmountIncludingTax numeric The total amount for the invoice,


including tax. Read-Only.

pricesIncludeTax boolean Specifies whether the prices include Tax


or not. Read-Only.

billingPostalAddress complex The billing postal address for the


invoice.

paymentTermsId GUID The id of the invoice payment term.

paymentTerms string, maximum size 10 The payment terms of the invoice.

shipmentMethodId GUID The id of the invoice shipment method.

shipmentMethod string, maximum size 10 The shipment method of the invoice.

salesperson string, maximum size 20 The salesperson code for the invoice.

lastModifiedDateTime datetime The last datetime the sales invoice was


modified. Read-Only.

Relationships
A Currency (currencyCode) must exist in the Currencies table.
A Payment Term (paymentTerms) must exist in the Payment Terms table.
A Shipment Method (shipmentMethod) must exist in the Shipment Method table.
A Customer (customerId) must exist in the Customer table.
An Order (orderId) must exist in the Sales Orders table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"invoiceDate": "Date",
"dueDate": "Date",
"customerPurchaseOrderReference": "string",
"customerId": "GUID",
"contactId": "string",
"customerNumber": "string",
"customerName": "string",
"billingPostalAddress": {NAV.PostalAddress},
"currencyId": "GUID",
"currencyCode": "string",
"orderId": "GUID",
"orderNumber": "string",
"paymentTermsId": "GUID",
"paymentTerms": "string",
"shipmentMethodId": "GUID",
"shipmentMethod": "string",
"salesperson": "string",
"pricesIncludeTax": "boolean",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"status": "string",
"lastModifiedDateTime": "DateTime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Invoice
Create Sales Invoice
Update Sales Invoice
Delete Sales Invoice
Get purchaseInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a purchase invoice line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/purchaseInvoices({id})/purchaseInvoiceLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a purchaseInvoiceLines object in the response
body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})/purchaseInvoiceL
ines(documentId=({id}),sequence=({number}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009"
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitCost": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"expectedReceiptDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice Line
Create Purchase Invoice Line
Update Purchase Invoice Line
Delete Purchase Invoice Line
Create purchaseInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Create a purchase invoice line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/purchaseInvoices({id})/purchaseInvoiceLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a purchaseInvoiceLines object.

Response
If successful, this method returns 201 Created response code and a purchaseInvoiceLines object in the response
body.

Example
Request
Here is an example of a request.

POST
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})/purchaseInvoiceL
ines
Content-type: application/json

{
"itemId": "id-value",
"lineType": "Item",
"quantity": 9
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice Line
Get Purchase Invoice Line
Update Purchase Invoice Line
Delete Purchase Invoice Line
Update purchaseInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a purchase invoice line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/purchaseInvoices({id})/purchaseInvoiceLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
purchaseInvoiceLines, the purchaseInvoiceLines will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated purchaseInvoiceLines object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})/purchaseInvoiceL
ines(documentId=({id}),sequence=({number}))
Content-type: application/json

{
"description": "someText"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009"
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitCost": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"expectedReceiptDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice Line
Get Purchase Invoice Line
Create Purchase Invoice Line
Delete Purchase Invoice Line
Delete purchaseInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Delete a purchase invoice line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/purchaseInvoices({id})/purchaseInvoiceLines(documentId=
({id}),sequence=({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
purchaseInvoiceLines, the purchaseInvoiceLines will not be
deleted.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/purchaseInvoices({id})/purchaseInvoiceL
ines(documentId=({id}),sequence=({number}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Purchase Invoice Line
Get Purchase Invoice Line
Create Purchase Invoice Line
Update Purchase Invoice Line
retainedEarningsStatement resource type
3/23/2018 • 1 min to read • Edit Online

Represents an retained earnings statement in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET retainedEarningsStatement retainedEarningsStatement Get a retained earnings statement


object.

Properties
PROPERTY TYPE DESCRIPTION

lineNumber numeric The retainedEarningsStatement item line


number.

display string The retainedEarningsStatement item


display name.

netChange numeric The retainedEarningsStatement item


Net Change.

lineType string The retainedEarningsStatement item line


type can be: header, detail, total, or
spacer.

indentation numeric The retainedEarningsStatement item


indentation used in report layout.

dateFilter date The date filter used to calculate the


retainedEarningsStatement items.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"lineNumber": "int",
"display": "string",
"netChange": "decimal",
"lineType": "string",
"indentation": "int",
"dateFilter": "date"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Retained Earnings Statement
Get retainedEarningsStatement
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a retained earnings statement report object for Dynamics 365
Business Central.

HTTP request
GET /businesscentral/companies({id})/retainedEarningsStatement

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a retainedEarningsStatement object in the
response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/retainedEarningsStatement?
$orderby=lineNumber&$filter=dateFilter ge 2019-01-01 and dateFilter le 2020-12-31

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"lineNumber": 20000,
"display": "Net Income",
"netChange": 77770.94,
"lineType": "detail",
"indentation": 0,
"dateFilter": "2016-12-31"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Retained Earnings Statement
salesInvoices resource type
3/23/2018 • 2 min to read • Edit Online

Represents a sales invoice in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesInvoices salesInvoices Gets a sales invoice object.

POST salesInvoices salesInvoices Creates a sales invoice object.

PATCH salesInvoices salesInvoices Updates a sales invoice object.

DELETE salesInvoices none Deletes a sales invoice object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The invoice ID. Non-editable.

number string, maximum size 20 The invoice number. Read-Only.

invoiceDate date The invoice date

customerPurchaseOrderReference string, maximum size 35 The customer purchase order reference


for the invoice

dueDate date The date the invoice is due.

customerNumber string, maximum size 20 The customer number for the invoice.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

customerId GUID The id of the invoice customer.

customerName string, maximum size 50 The full name of the customer. Read-
Only.
PROPERTY TYPE DESCRIPTION

currencyId GUID The id of the invoice currency.

currencyCode string, maximum size 10 The currency code for the invoice.

orderId GUID The unique id of the order to which the


invoice is associated to. Read-Only.

orderNumber string, maximum size 20 The number of the order to which the
invoice is associated to. Read-Only.

status string, maximum size 20 The invoice status. Status can be: Draft,
In Review, Open, Paid, Canceled, or
Corrective. Read-Only.

discountAmount numeric The invoice discount amount

discountAppliedBeforeTax boolean Specifies whether the discount is


applied before tax.

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the invoice.


Read-Only.

totalAmountIncludingTax numeric The total amount for the invoice,


including tax. Read-Only.

pricesIncludeTax boolean Specifies whether the prices include Tax


or not. Read-Only.

billingPostalAddress complex The billing postal address for the


invoice.

paymentTermsId GUID The id of the invoice payment term.

paymentTerms string, maximum size 10 The payment terms of the invoice.

shipmentMethodId GUID The id of the invoice shipment method.

shipmentMethod string, maximum size 10 The shipment method of the invoice.

salesperson string, maximum size 20 The salesperson code for the invoice.

lastModifiedDateTime datetime The last datetime the sales invoice was


modified. Read-Only.

Relationships
A Currency (currencyCode) must exist in the Currencies table.
A Payment Term (paymentTerms) must exist in the Payment Terms table.
A Shipment Method (shipmentMethod) must exist in the Shipment Method table.
A Customer (customerId) must exist in the Customer table.
An Order (orderId) must exist in the Sales Orders table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"invoiceDate": "Date",
"dueDate": "Date",
"customerPurchaseOrderReference": "string",
"customerId": "GUID",
"contactId": "string",
"customerNumber": "string",
"customerName": "string",
"billingPostalAddress": {NAV.PostalAddress},
"currencyId": "GUID",
"currencyCode": "string",
"orderId": "GUID",
"orderNumber": "string",
"paymentTermsId": "GUID",
"paymentTerms": "string",
"shipmentMethodId": "GUID",
"shipmentMethod": "string",
"salesperson": "string",
"pricesIncludeTax": "boolean",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"status": "string",
"lastModifiedDateTime": "DateTime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Invoice
Create Sales Invoice
Update Sales Invoice
Delete Sales Invoice
Get salesInvoices
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/salesInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesInvoices object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"dueDate": "2016-01-31",
"customerPurchaseOrderReference": "",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL00000008",
"customerName": "GL00000008",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId": "currencyId-value",
"currencyCode": "GBP",
"orderId": "id-value",
"orderNumber": "",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": "COD",
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": "",
"salesperson": "",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice
Create Sales Invoice
Update Sales Invoice
Delete Sales Invoice
Create salesInvoices
3/23/2018 • 1 min to read • Edit Online

Create a sales invoice object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesInvoices

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesInvoices object.

Response
If successful, this method returns 201 Created response code and a salesInvoices object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"customerNumber": "GL00000008",
"currencyCode": "GBP",
"paymentTerms": "COD"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice
Get Sales Invoice
Update Sales Invoice
Delete Sales Invoice
Update salesInvoices
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales invoice object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesInvoices, the salesInvoices will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesInvoices object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})
Content-type: application/json

{
"paymentTerms": "COD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"invoiceDate": "2015-12-31",
"dueDate": "2016-01-31",
"customerPurchaseOrderReference": "",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL00000008",
"customerName": "GL00000008",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyCode": "GBP",
"orderId": "id-value",
"orderNumber": "",
"paymentTerms": "COD",
"shipmentMethod": "",
"salesperson": "",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice
Get Sales Invoice
Create Sales Invoice
Delete Sales Invoice
Delete salesInvoices
3/23/2018 • 1 min to read • Edit Online

Delete a sales invoice object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesInvoices({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesInvoices, the salesInvoices will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice
Get Sales Invoice
Create Sales Invoice
Update Sales Invoice
salesInvoiceLines resource type
3/23/2018 • 2 min to read • Edit Online

Represents a line on a sales invoice in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesInvoiceLines salesInvoiceLines Gets a sales invoice line object

POST salesInvoiceLines salesInvoiceLines Creates a sales invoice line object.

PATCH salesInvoiceLines salesInvoiceLines Updated a sales invoice line object.

DELETE salesInvoiceLines none Deletes a sales invoice line object.

Properties
PROPERTY TYPE DESCRIPTION

documentId GUID The ID of the parent invoice.

sequence numeric The line sequence number.

itemId GUID The Id of the item in the invoice line.

accountId GUID The Id of the Account that will be used


for this line. lineType will automatically
be set to "Account" if this is set.

lineType string The type of the line. Can be


Comment,Account,Item,Resource,Fixed
Asset,Charge

lineDetails complex The details of the line.

description string A description of the item in the invoice


line.

unitOfMeasureId GUID The unit of measure for the invoice line.

unitOfMeasure NAV.UnitOfMeasure The unit of measure complex type.


PROPERTY TYPE DESCRIPTION

quantity numeric The quantity of the item in the invoice


line.

unitPrice numeric The unit price of each individual item in


the invoice line.

discountAmount numeric The line discount amount.

discountPercent numeric The line discount percent.

discountAppliedBeforeTax boolean Specified if the discount is applied


before tax. Read-Only.

amountExcludingTax numeric The line amount excluding the tax.


Read-Only.

taxCode string The tax code for the line.

taxPercent numeric The tax percent for the line. Read-Only.

totalTaxAmount numeric The total tax amount for the line. Read-
Only.

amountIncludingTax numeric The total amount for the line including


tax. Read-Only.

invoiceDiscountAllocation numeric The invoice discount allocation is the


invoice discount distributed on the total
amount. Read-Only.

netAmount numeric The net amount is the amount


including all discounts (taken from
invoice header). Read-Only.

netTaxAmount numeric The net tax amount is the tax amount


calculated from net amount. Read-Only.

netAmountIncludingTax numeric The net amount including tax is the


total net amount including tax. Read-
Only.

shipmentDate date The date the item in the line is expected


to ship.

Relationships
A Sales Invoice (documentId) must exist in the Sales Invoices table.
An Item (itemId) must exist in the Item table.
An Account (accountId) must exist in the Accounts table.
A Unit of Measure (unitOfMeasure) must exist in the Unit of Measure table.
JSON representation
Here is a JSON representation of the resource.

"value": [
{
"documentId": "GUID",
"sequence": "decimal",
"itemId": "GUID",
"accountId": "GUID",
"lineType": "string",
"lineDetails": {NAV.documentLineObjectDetails},
"description": "string",
"unitOfMeasureId": "GUID",
"unitOfMeasure": {NAV.UnitOfMeasure},
"unitPrice": "decimal",
"quantity": "decimal",
"discountAmount": "decimal",
"discountPercent": "decimal",
"discountAppliedBeforeTax": "boolean",
"amountExcludingTax": "decimal",
"taxCode": "string",
"taxPercent": "decimal",
"totalTaxAmount": "decimal",
"amountIncludingTax": "decimal",
"invoiceDiscountAllocation": "decimal",
"netAmount": "decimal",
"netTaxAmount": "decimal",
"netAmountIncludingTax": "decimal",
"shipmentDate": "Date"
}
]

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Invoice Line
Create Sales Invoice Line
Update Sales Invoice Line
Delete Sales Invoice Line
Get salesInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales invoice line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/salesInvoices({id})/salesInvoiceLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesInvoiceLines object in the response body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})/salesInvoiceLines(d
ocumentId=({id}),sequence=({number}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009",
"description": null
},
"description": "someText",
"unitOfMeasureId": "id-value",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice Line
Create Sales Invoice Line
Update Sales Invoice Line
Delete Sales Invoice Line
Create salesInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Create a sales invoice line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesInvoices({id})/salesInvoiceLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesInvoiceLines object.

Response
If successful, this method returns 201 Created response code and a salesInvoiceLines object in the response
body.

Example
Request
Here is an example of a request.

POST
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})/salesInvoiceLines
Content-type: application/json

{
"itemId": "id-value",
"lineType": "Item",
"quantity": 9
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice Line
Get Sales Invoice Line
Update Sales Invoice Line
Delete Sales Invoice Line
Update salesInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales invoice line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesInvoices({id})/salesInvoiceLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesInvoiceLines, the salesInvoiceLines will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesInvoiceLines object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices{id}/salesInvoiceLines(doc
umentId=({id}),sequence={number}))
Content-type: application/json

{
"description": "someText"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009",
"description": null
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice Line
Get Sales Invoice Line
Create Sales Invoice Line
Delete Sales Invoice Line
Delete salesInvoiceLines
3/23/2018 • 1 min to read • Edit Online

Delete a sales invoice line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesInvoices({id})/salesInvoiceLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesInvoiceLines, the salesInvoiceLines will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesInvoices({id})/salesInvoiceLines(
documentId=({id}),sequence=({number}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Invoice Line
Get Sales Invoice Line
Create Sales Invoice Line
Update Sales Invoice Line
salesCreditMemos resource type
3/23/2018 • 2 min to read • Edit Online

Represents a sales credit memo in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesCreditMemos salesCreditMemos Gets a sales credit memo object.

POST salesCreditMemos salesCreditMemos Creates a sales credit memo object.

PATCH salesCreditMemos salesCreditMemos Update a sales credit memo object.

DELETE salesCreditMemos none Delete a sales credit memo object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The credit memo ID. Non-editable.

number string, maximum size 20 The credit memo number. Read-Only.

creditMemoDate date The credit memo date

dueDate date The date the credit memo is due.

customerId GUID The id of the credit memo customer.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

customerNumber string, maximum size 20 The customer number for the credit
memo.

customerName string, maximum size 50 The full name of the customer. Read-
Only.

billingPostalAddress complex The billing postal address for the credit


memo.
PROPERTY TYPE DESCRIPTION

currencyId GUID The id of the credit memo currency.

currencyCode string, maximum size 10 The currency code for the credit memo.

paymentTermsId GUID The id of the credit memo payment


term.

paymentTerms string, maximum size 10 The payment terms of the credit memo.

salesperson string, maximum size 20 The salesperson code for the credit
memo.

pricesIncludeTax boolean Specifies whether the prices include Tax


or not. Read-Only.

discountAmount numeric The credit memo discount amount

discountAppliedBeforeTax boolean Specifies whether the discount is


applied before tax.

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the credit


memo. Read-Only.

totalAmountIncludingTax numeric The total amount for the credit memo,


including tax. Read-Only.

status string, maximum size 20 The credit memo status. Status can be:
Draft, In Review, Open, Paid, Canceled,
or Corrective. Read-Only.

lastModifiedDateTime datetime The last datetime the sales credit memo


was modified. Read-Only.

invoiceId GUID The sales invoice ID that the credit


memo is linked to.

invoiceNumber GUID The sales invoice number that the credit


memo is linked to.

Relationships
A Currency (currencyCode) must exist in the Currencies table.
A Payment Term (paymentTerms) must exist in the Payment Terms table.
A Customer (customerId) must exist in the Customer table.
An Invoice (invoiceId) must exist in the Sales Invoice table.

JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"number": "string",
"creditMemoDate": "Date",
"dueDate": "Date",
"customerId": "GUID",
"contactId": "string",
"customerNumber": "string",
"customerName": "string",
"billingPostalAddress": {NAV.PostalAddress},
"currencyId": "GUID",
"currencyCode": "string",
"paymentTermsId": "GUID",
"paymentTerms": "string",
"salesperson": "string",
"pricesIncludeTax": "boolean",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"status": "string",
"lastModifiedDateTime": "DateTime",
"invoiceId" : "GUID",
"invoiceNumber" : "string"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Credit Memo
Create Sales Credit Memo
Update Sales Credit Memo
Delete Sales Credit Memo
Get salesCreditMemos
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales credit memo object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/salesCreditMemos({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesCreditMemos object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1009",
"creditMemoDate": "2015-12-31",
"dueDate": "2016-01-31",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL00000008",
"customerName": "GL00000008",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId": "currencyId-value",
"currencyCode": "GBP",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": "COD",
"salesperson": "",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z",
"invoiceId": "invoiceid-value",
"invoiceNumber": "100009"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo
Create Sales Credit Memo
Update Sales Credit Memo
Delete Sales Credit Memo
Create salesCreditMemos
3/23/2018 • 1 min to read • Edit Online

Create a sales credit memo object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesCreditMemos

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesCreditMemos object.

Response
If successful, this method returns 201 Created response code and a salesCreditMemos object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"creditMemoDate": "2015-12-31",
"customerNumber": "GL00000008",
"currencyCode": "GBP",
"paymentTerms": "COD"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo
Get Sales Credit Memo
Update Sales Credit Memo
Delete Sales Credit Memo
Update salesCreditMemos
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales credit memo object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesCreditMemos({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesCreditMemos, the salesCreditMemos will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesCreditMemos object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})
Content-type: application/json

{
"paymentTerms": "COD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"creditMemoDate": "2015-12-31",
"dueDate": "2016-01-31",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL00000008",
"customerName": "GL00000008",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId" : "currencyId-value",
"currencyCode": "GBP",
"paymentTermsId" : "paymentTermsId-value"
"paymentTerms": "COD",
"pricesIncludeTax": false,
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z",
"invoiceId": "invoiceid-value",
"invoiceNumber": "100009"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo
Get Sales Credit Memo
Create Sales Credit Memo
Delete Sales Credit Memo
Delete salesCreditMemos
3/23/2018 • 1 min to read • Edit Online

Delete a sales credit memo object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesCreditMemos({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesCreditMemos, the salesCreditMemos will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo
Get Sales Credit Memo
Create Sales Credit Memo
Update Sales Credit Memo
salesCreditMemoLines resource type
3/23/2018 • 2 min to read • Edit Online

Represents a line on a sales credit memo line in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesCreditMemoLines salesCreditMemoLines Gets a sales credit memo line object.

POST salesCreditMemoLines salesCreditMemoLines Creates a sales credit memo line object.

PATCH salesCreditMemoLines salesCreditMemoLines Updates a sales credit memo line object.

DELETE salesCreditMemoLines none Deletes a sales credit memo line object.

Properties
PROPERTY TYPE DESCRIPTION

documentId GUID The ID of the parent credit memo.

sequence numeric The line sequence number.

itemId GUID The Id of the item in the credit memo


line.

accountId GUID The Id of the Account that will be used


for this line. lineType will automatically
be set to "Account" if this is set.

lineType string The type of the line. Can be


Comment,Account,Item,Resource,Fixed
Asset,Charge

lineDetails complex The details of the line.

description string A description of the item in the credit


memo line.

unitOfMeasureId GUID The unit of measure for the credit


memo line.

unitOfMeasure NAV.UnitOfMeasure The unit of measure complex type.


PROPERTY TYPE DESCRIPTION

quantity numeric The quantity of the item in the credit


memo line.

unitPrice numeric The unit price of each individual item in


the credit memo line.

discountAmount numeric The line discount amount.

discountPercent numeric The line discount percent.

discountAppliedBeforeTax boolean Specified if the discount is applied


before tax. Read-Only.

amountExcludingTax numeric The line amount excluding the tax.


Read-Only.

taxCode string The tax code for the line.

taxPercent numeric The tax percent for the line. Read-Only.

totalTaxAmount numeric The total tax amount for the line. Read-
Only.

amountIncludingTax numeric The total amount for the line including


tax. Read-Only.

invoiceDiscountAllocation numeric The credit memo discount allocation is


the credit memo discount distributed
on the total amount. Read-Only.

netAmount numeric The net amount is the amount


including all discounts (taken from
credit memo header). Read-Only.

netTaxAmount numeric The net tax amount is the tax amount


calculated from net amount. Read-Only.

netAmountIncludingTax numeric The net amount including tax is the


total net amount including tax. Read-
Only.

shipmentDate date The date the item in the line is expected


to ship.

Relationships
A Sales Credit Memo (documentId) must exist in the Sales Credit Memos table.
An Item (itemId) must exist in the Item table.
An Account (accountId) must exist in the Accounts table.
A Unit of Measure (unitOfMeasure) must exist in the Unit of Measure table.
JSON representation
Here is a JSON representation of the resource.

"value": [
{
"documentId": "GUID",
"sequence": "decimal",
"itemId": "GUID",
"accountId": "GUID",
"lineType": "string",
"lineDetails": {NAV.documentLineObjectDetails},
"description": "string",
"unitOfMeasureId": "GUID",
"unitOfMeasure": {NAV.UnitOfMeasure},
"unitPrice": "decimal",
"quantity": "decimal",
"discountAmount": "decimal",
"discountPercent": "decimal",
"discountAppliedBeforeTax": "boolean",
"amountExcludingTax": "decimal",
"taxCode": "string",
"taxPercent": "decimal",
"totalTaxAmount": "decimal",
"amountIncludingTax": "decimal",
"invoiceDiscountAllocation": "decimal",
"netAmount": "decimal",
"netTaxAmount": "decimal",
"netAmountIncludingTax": "decimal",
"shipmentDate": "Date"
}
]

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Credit Memo Line
Create Sales Credit Memo Line
Update Sales Credit Memo Line
Delete Sales Credit Memo Line
Get salesCreditMemoLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales credit memo line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/salesCreditMemos({id})/salesCreditMemoLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesCreditMemoLines object in the response
body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})/salesCreditMemoL
ines(documentId=({id}),sequence=({number}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009",
"description": null
},
"description": "someText",
"unitOfMeasureId": "id-value",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo Line
Create Sales Credit Memo Line
Update Sales Credit Memo Line
Delete Sales Credit Memo Line
Create salesCreditMemoLines
3/23/2018 • 1 min to read • Edit Online

Create a sales credit memo line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesCreditMemos({id})/salesCreditMemoLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesCreditMemoLines object.

Response
If successful, this method returns 201 Created response code and a salesCreditMemoLines object in the
response body.

Example
Request
Here is an example of a request.

POST
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})/salesCreditMemoL
ines
Content-type: application/json

{
"itemId": "id-value",
"lineType": "Item",
"quantity": 9
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo Line
Get Sales Credit Memo Line
Update Sales Credit Memo Line
Delete Sales Credit Memo Line
Update salesCreditMemoLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales credit memo line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesCreditMemos({id})/salesCreditMemoLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesCreditMemoLines, the salesCreditMemoLines will not
be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated sales credit memo line object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})/salesCreditMemoL
ines(documentId=({id}),sequence=({number}))
Content-type: application/json

{
"description": "someText"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000009",
"displayName": "GL000009",
"description": null
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 71.1,
"quantity": 96,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2015-02-24"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo Line
Get Sales Credit Memo Line
Create Sales Credit Memo Line
Delete Sales Credit Memo Line
Delete salesCreditMemoLines
3/23/2018 • 1 min to read • Edit Online

Delete a sales credit memo line object in Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesCreditMemos({id})/salesCreditMemoLines(documentId=
({id}),sequence=({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesCreditMemoLines, the salesCreditMemoLines will not
be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesCreditMemos({id})/salesCreditMemo
Lines(documentId=({id}),sequence=({number}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Credit Memo Line
Get Sales Credit Memo Line
Create Sales Credit Memo Line
Update Sales Credit Memo Line
salesOrders resource type
3/23/2018 • 2 min to read • Edit Online

Represents a sales order in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesOrders salesOrders Get a sales order object.

POST salesOrders salesOrders Create a sales order object.

PATCH salesOrders salesOrders Update a sales order object.

DELETE salesOrders none Delete a sales order object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The order ID. Non-editable.

number string, maximum size 20 The order number. Read-Only.

orderDate date The order date

customerId GUID The id of the order customer.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

customerNumber string, maximum size 20 The customer number for the order.

customerName string, maximum size 50 The full name of the customer. Read-
Only.

billingPostalAddress complex The billing postal address for the order.

currencyId GUID The id of the order currency.

currencyCode string, maximum size 10 The currency code for the order.
PROPERTY TYPE DESCRIPTION

pricesIncludeTax boolean Specifies whether the prices include Tax


or not. Read-Only.

paymentTermsId GUID The id of the order payment term.

paymentTerms string, maximum size 10 The payment terms of the order.

salesperson string, maximum size 20 The salesperson code for the order.

partialShipping boolean Specifies whether partial shipping of


items is preferred or not.

requestedDeliveryDate Date The requested delivery date.

discountAmount numeric The order discount amount

discountAppliedBeforeTax boolean Specifies whether the discount is


applied before tax. Read-Only.

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the order.


Read-Only.

totalAmountIncludingTax numeric The total amount for the order,


including tax. Read-Only.

fullyShipped boolean Specifies whether the items of the order


were fully shipped or not.

status string, maximum size 20 The order status. Status can be:
Cancelled, Paid, On hold, Created. Read-
Only.

lastModifiedDateTime datetime The last datetime the sales order was


modified. Read-Only.

Relationships
A Currency(currencyCode) must exist in the Currencies table.
A Payment Term(paymentTerms) must exist in the Payment Terms table.
A Shipment Method(shipmentMethod) must exist in the Shipment Method table.
A Customer (customerId) must exist in the Customer table.

JSON representation
Here is a JSON representation of the resource.
{
"id": "GUID",
"number": "string",
"orderDate": "Date",
"customerId": "GUID",
"contactId": "string",
"customerNumber": "string",
"customerName": "string",
"billingPostalAddress": {NAV.PostalAddress},
"currencyId": "GUID",
"currencyCode": "string",
"pricesIncludeTax": "boolean",
"paymentTermsId": "GUID",
"paymentTerms": "string",
"salesperson": "string",
"partialShipping": "boolean",
"requestedDeliveryDate": "Date",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"fullyShipped": "boolean",
"status": "string",
"lastModifiedDateTime": "DateTime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Order
Create Sales Order
Update Sales Order
Delete Sales Order
Get salesOrders
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales order object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/salesOrders({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesOrders object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1006",
"orderDate": "2019-01-24",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL000090",
"customerName": "GL000090",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId": "id-value",
"currencyCode": "GBP",
"pricesIncludeTax": false,
"paymentTermsId": "id-value",
"paymentTerms": "COD",
"salesperson": "",
"partialShipping": true,
"requestedDeliveryDate": "2015-06-01",
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"fullyShipped": true,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order
Create Sales Order
Update Sales Order
Delete Sales Order
Create salesOrders
3/23/2018 • 1 min to read • Edit Online

Create a sales order object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesOrders

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesOrders object.

Response
If successful, this method returns 201 Created response code and a salesOrders object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders
Content-type: application/json

{
"id": "id-value",
"number": "1009",
"orderDate": "2015-12-31",
"customerNumber": "GL00000008",
"currencyCode": "GBP",
"paymentTerms": "COD"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order
Get Sales Order
Update Sales Order
Delete Sales Order
Update salesOrders
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales orders object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesOrders({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the salesOrders,
the salesOrders will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesOrders object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})
Content-type: application/json

{
"paymentTerms": "COD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1006",
"orderDate": "2019-01-24",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "GL000090",
"customerName": "GL000090",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyCode": "GBP",
"pricesIncludeTax": false,
"paymentTerms": "COD",
"salesperson": "",
"partialShipping": true,
"requestedDeliveryDate": "2015-06-01",
"discountAmount": 0,
"discountAppliedBeforeTax": true,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"fullyShipped": true,
"status": "Draft",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order
Get Sales Order
Create Sales Order
Delete Sales Order
Delete salesOrders
3/23/2018 • 1 min to read • Edit Online

Delete a sales order object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesOrders({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the salesOrders,
the salesOrders will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order
Get Sales Order
Create Sales Order
Update Sales Order
salesOrderLines resource type
3/23/2018 • 2 min to read • Edit Online

Represents a line on a sales order in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesOrderLines salesOrderLines Gets a sales order line object.

POST salesOrderLines salesOrderLines Creates a sales order line object.

PATCH salesOrderLines salesOrderLines Updates a sales order line object.

DELETE salesOrderLines none Deletes a sales order line object.

Properties
PROPERTY TYPE DESCRIPTION

documentId GUID The ID of the parent order.

sequence numeric The line sequence number.

itemId GUID The Id of the item in the order line.

accountId GUID The Id of the Account that will be used


for this line. lineType will automatically
be set to "Account" if this is set.

lineType string The type of the line. Can be


Comment,Account,Item,Resource,Fixed
Asset,Charge

lineDetails complex The details of the line.

description string A description of the item in the order


line.

unitOfMeasureId GUID The Id of the unit of measure in the


order line.

unitOfMeasure NAV.UnitOfMeasure The unit of measure complex type.


PROPERTY TYPE DESCRIPTION

quantity numeric The quantity of the item in the order


line.

unitPrice numeric The unit price of each individual item in


the order line.

discountAmount numeric The line discount amount.

discountPercent numeric The line discount percent.

discountAppliedBeforeTax boolean Specified if the discount is applied


before tax. Read-Only.

amountExcludingTax numeric The line amount excluding the tax.


Read-Only.

taxCode string The tax code for the line.

taxPercent numeric The tax percent for the line. Read-Only.

totalTaxAmount numeric The total tax amount for the line. Read-
Only.

amountIncludingTax numeric The total amount for the line including


tax. Read-Only.

invoiceDiscountAllocation numeric The invoice discount allocation is the


order discount distributed on the total
amount. Read-Only.

netAmount numeric The net amount is the amount


including all discounts (taken from
order header). Read-Only.

netTaxAmount numeric The net tax amount is the tax amount


calculated from net amount. Read-Only.

netAmountIncludingTax numeric The net amount including tax is the


total net amount including tax. Read-
Only.

shipmentDate date The date the item in the line is expected


to ship.

shippedQuantity numeric The quantity of items from the order


already shipped.

invoicedQuantity numeric The quantity of items from the order


already invoiced.

invoiceQuantity numeric The quantity of items from the order to


be invoiced.
PROPERTY TYPE DESCRIPTION

shipQuantity numeric The quantity of items from the order to


be shipped.

Relationships
A Sales Order (documentId) must exist in the Sales Orders table.
An Item (itemId) must exist in the Item table.
An Account (accountId) must exist in the Accounts table.
A Unit of Measure (unitOfMeasure) must exist in the Unit of Measure table.

JSON representation
Here is a JSON representation of the resource.

"value": [
{
"documentId": "GUID",
"sequence": "decimal",
"itemId": "GUID",
"accountId": "GUID",
"lineType": "string",
"lineDetails": {NAV.documentLineObjectDetails},
"description": "string",
"unitOfMeasure": {NAV.UnitOfMeasure},
"unitPrice": "decimal",
"quantity": "decimal",
"discountAmount": "decimal",
"discountPercent": "decimal",
"discountAppliedBeforeTax": "boolean",
"amountExcludingTax": "decimal",
"taxCode": "string",
"taxPercent": "decimal",
"totalTaxAmount": "decimal",
"amountIncludingTax": "decimal",
"invoiceDiscountAllocation": "decimal",
"netAmount": "decimal",
"netTaxAmount": "decimal",
"netAmountIncludingTax": "decimal",
"shipmentDate": "Date",
"shippedQuantity": "decimal",
"invoicedQuantity": "decimal",
"invoiceQuantity": "decimal",
"shipQuantity": "decimal"
}
]

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Order Line
Create Sales Order Line
Update Sales Order Line
Delete Sales Order Line
Get salesOrderLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales order line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/salesOrders({id})/salesOrderLines(documentId=({id}),sequence=({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesOrderLines object in the response body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})/salesOrderLines(docum
entId=({id}),sequence=({number}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000091",
"displayName": "GL000091",
"description": null
},
"description": "GL00000091",
"unitOfMeasureId": "id-value",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"quantity": 96,
"unitPrice": 71.1,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2019-01-24",
"shippedQuantity": 0,
"invoicedQuantity": 0,
"invoiceQuantity": 96,
"shipQuantity": 96
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order Line
Create Sales Order Line
Update Sales Order Line
Delete Sales Order Line
Create salesOrderLines
3/23/2018 • 1 min to read • Edit Online

Create a sales order line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesOrders({id})/salesOrderLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesOrderLines object.

Response
If successful, this method returns 201 Created response code and a salesOrderLines object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})/salesOrderLines
Content-type: application/json

{
"itemId": "id-value",
"lineType": "Item",
"quantity": 9
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order Line
Get Sales Order Line
Update Sales Order Line
Delete Sales Order Line
Update salesOrderLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales order line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesOrders({id})/salesOrderLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesOrderLines, the salesOrderLines will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesOrderLines object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})/salesOrderLines(docum
entId=({id}),sequence=({number}))
Content-type: application/json

{
"description": "someText"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "GL000091",
"displayName": "GL000091",
"description": null
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"quantity": 96,
"unitPrice": 71.1,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6825.6,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 682.56,
"amountIncludingTax": 7508.16,
"invoiceDiscountAllocation": 0,
"netAmount": 6825.6,
"netTaxAmount": 682.56,
"netAmountIncludingTax": 7508.16,
"shipmentDate": "2019-01-24",
"shippedQuantity": 0,
"invoicedQuantity": 0,
"invoiceQuantity": 96,
"shipQuantity": 96
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order Line
Get Sales Order Line
Create Sales Order Line
Delete Sales Order Line
Delete salesOrderLines
3/23/2018 • 1 min to read • Edit Online

Delete a sales order line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesOrders({id})/salesOrderLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesOrderLines, the salesOrderLines will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesOrders({id})/salesOrderLines(docu
mentId=({id}),sequence=({number}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Order Line
Get Sales Order Line
Create Sales Order Line
Update Sales Order Line
salesQuotes resource type
3/23/2018 • 2 min to read • Edit Online

Represents a salesQuote resource type in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesQuotes salesQuotes Gets a sales quote object.

POST salesQuotes salesQuotes Creates a sales quote object.

PATCH salesQuotes salesQuotes Updates a sales quote object.

DELETE salesQuotes none Deletes a sales quote object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The quote ID. Read-Only.

number string, maximum size 20 The quote number. Read-Only.

externalDocumentNumber string, maximum size 35 The external document number.

documentDate date The quote date

dueDate date The quote due date

customerId GUID The id of the quote customer.

contactId string, maximum size 250 The exchange contact id for the given
customer. If a customer id is not
specified, we will use the contact id to
find it.

customerNumber string, maximum size 20 The customer number for the quote.

customerName string, maximum size 50 The full name of the customer. Read-
Only.

billingPostalAddress complex The billing postal address for the quote.


PROPERTY TYPE DESCRIPTION

currencyId GUID The id of the quote currency.

currencyCode string, maximum size 10 The currency code for the quote.

paymentTermsId GUID The id of the quote payment term.

paymentTerms string, maximum size 10 The payment terms of the quote.

shipmentMethodId GUID The id of the quote shipment method.

shipmentMethod string, maximum size 10 The payment terms of the quote.

salesperson string, maximum size 20 The salesperson code for the quote.

discountAmount numeric The quote discount amount

totalAmountExcludingTax numeric The total amount excluding tax. Read-


Only.

totalTaxAmount numeric The total tax amount for the quote.


Read-Only.

totalAmountIncludingTax numeric The total amount for the quote,


including tax. Read-Only.

status string, maximum size 20 The quote status. Status can be:
Draft,Sent,Accepted. Read-Only.

sentDate datetime The the date and time the quote was
sent our to the customer. Read-Only.

validUntilDate Date The date a quote is valid until.

acceptedDate Date The date a quote is accepted. Read-


Only.

lastModifiedDateTime datetime The last datetime the sales quote was


modified. Read-Only.

Relationships
A Currency(currencyCode) must exist in the Currencies table.
A Payment Term(paymentTerms) must exist in the Payment Terms table.
A Shipment Method(shipmentMethod) must exist in the Shipment Method table.
A Customer (customerId) must exist in the Customer table.

JSON representation
Here is a JSON representation of the resource.
{
"id": "GUID",
"number": "string",
"externalDocumentNumber": "string",
"documentDate": "Date",
"dueDate": "Date",
"customerId": "GUID",
"contactId": "string",
"customerNumber": "string",
"customerName": "string",
"billingPostalAddress": {NAV.PostalAddress},
"currencyId": "GUID",
"currencyCode": "string",
"paymentTermsId": "GUID",
"paymentTerms": "string",
"shipmentMethodId": "GUID",
"shipmentMethod": "string",
"salesperson": "string",
"discountAmount": "decimal",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"status": "string",
"sentDate": "DateTime",
"validUntilDate": "Date",
"acceptedDate": "Date",
"lastModifiedDateTime": "DateTime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Sales Quote
Create Sales Quote
Update Sales Quote
Delete Sales Quote
Get salesQuotes
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales quote object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/salesQuotes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesQuotes object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "1006",
"externalDocumentNumber": "",
"documentDate": "2019-01-24",
"dueDate": "2019-01-24",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "10000",
"customerName": "Coho Winery",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId": "currencyId-value",
"currencyCode": "GBP",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": "COD",
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": "EXW",
"salesperson": "",
"discountAmount": 0,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Open",
"sentDate": "0001-01-01T00:00:00Z",
"validUntilDate": "2019-01-24",
"acceptedDate": "2019-01-24",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote
Create Sales Quote
Update Sales Quote
Delete Sales Quote
Create salesQuotes
3/23/2018 • 1 min to read • Edit Online

Create a sales quote object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesQuotes

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesQuotes object.

Response
If successful, this method returns 201 Created response code and a salesQuotes object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes
Content-type: application/json

{
"id": "id-value",
"number": "1006",
"documentDate": "2016-12-31",
"customerNumber": "10000",
"currencyCode": "GBP",
"paymentTerms": "COD"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote
Get Sales Quote
Update Sales Quote
Delete Sales Quote
Update salesQuotes
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales quotes object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesQuotes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the salesQuote,
the salesQuote will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesQuotes object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})
Content-type: application/json

{
"paymentTerms": "COD"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "1006",
"externalDocumentNumber": "",
"documentDate": "2019-01-24",
"dueDate": "2019-01-24",
"customerId": "customerId-value",
"contactId": "",
"customerNumber": "10000",
"customerName": "Coho Winery",
"billingPostalAddress": {
"street": "",
"city": "",
"state": "",
"countryLetterCode": "",
"postalCode": ""
},
"currencyId": "currencyId-value",
"currencyCode": "GBP",
"paymentTermsId": "paymentTermsId-value",
"paymentTerms": "COD",
"shipmentMethodId": "shipmentMethodId-value",
"shipmentMethod": "EXW",
"salesperson": "",
"discountAmount": 0,
"totalAmountExcludingTax": 6825.6,
"totalTaxAmount": 682.56,
"totalAmountIncludingTax": 7508.16,
"status": "Open",
"sentDate": "0001-01-01T00:00:00Z",
"validUntilDate": "0001-01-01",
"acceptedDate": "0001-01-01",
"lastModifiedDateTime": "2017-03-17T19:02:22.043Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote
Get Sales Quote
Create Sales Quote
Delete Sales Quote
Delete salesQuotes
3/23/2018 • 1 min to read • Edit Online

Delete a salesQuote from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesQuotes({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesQuotes, the salesQuotes will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote
Get Sales Quote
Create Sales Quote
Update Sales Quote
salesQuoteLines resource type
3/23/2018 • 2 min to read • Edit Online

Represents a salesQuoteLines resource type in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET salesQuoteLines salesQuoteLines Get a sales quote line object.

POST salesQuoteLines salesQuoteLines Creates a sales quote line object.

PATCH salesQuoteLines salesQuoteLines Updates a sales quote line object.

DELETE salesQuoteLines none Deletes a sales quote line object.

Properties
PROPERTY TYPE DESCRIPTION

documentId GUID The ID of the parent quote.

sequence numeric The line sequence number.

itemId GUID The Id of the item in the quote line.

accountId GUID The Id of the Account that will be used


for this line. lineType will automatically
be set to "Account" if this is set.

lineType string The type of the line. Can be


Comment,Account,Item,Resource,Fixed
Asset,Charge

lineDetails complex The details of the line.

description string A description of the item in the quote


line.

unitOfMeasureId GUID The Id of the unit of measure in the


quote line.

unitOfMeasure NAV.UnitOfMeasure The unit of measure complex type.


PROPERTY TYPE DESCRIPTION

unitPrice numeric The unit price of each individual item in


the quote line.

quantity numeric The quantity of the item in the quote


line.

discountAmount numeric The line discount amount.

discountPercent numeric The line discount percent.

discountAppliedBeforeTax boolean Specified if the discount is applied


before tax. Read-Only.

amountExcludingTax numeric The line amount excluding the tax.


Read-Only.

taxCode string The tax code for the line.

taxPercent decimal The tax percent for the line.

totalTaxAmount numeric The total tax amount for the line. Read-
Only.

amountIncludingTax numeric The total amount for the line including


tax. Read-Only.

netAmount numeric The net amount is the amount


including all discounts (taken from
quote header). Read-Only.

netTaxAmount numeric The net tax amount is the tax amount


calculated from net amount. Read-Only.

netAmountIncludingTax numeric The net amount including tax is the


total net amount including tax. Read-
Only.

Relationships
A Sales Quote (documentId) must exist in the Sales Quotes table.
An Item (itemId) must exist in the Item table.
An Account (accountId) must exist in the Accounts table.
A Unit of Measure (unitOfMeasure) must exist in the Unit of Measure table.

JSON representation
Here is a JSON representation of the resource.
"value": [
{
"documentId": "GUID",
"sequence": "decimal",
"itemId": "GUID",
"accountId": "GUID",
"lineType": "String",
"lineDetails": {NAV.documentLineObjectDetails},
"description": "string",
"unitOfMeasureId": "GUID",
"unitOfMeasure": {NAV.UnitOfMeasure},
"unitPrice": "decimal",
"quantity": "decimal",
"discountAmount": "decimal",
"discountPercent": "decimal",
"discountAppliedBeforeTax": "boolean",
"amountExcludingTax": "decimal",
"taxCode": "String",
"taxPercent": "decimal",
"totalTaxAmount": "decimal",
"amountIncludingTax": "decimal",
"netAmount": "decimal",
"netTaxAmount": "decimal",
"netAmountIncludingTax": "decimal"
}
]

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote Line
Get Sales Quote Line
Create Sales Quote Line
Update Sales Quote Line
Delete Sales Quote Line
Get salesQuoteLines
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a sales quote line object for Dynamics 365 Business Central.

Prerequisites
HTTP request
GET /businesscentral/companies({id})/salesQuotes({id})/salesQuoteLines(documentId=({id}),sequence=({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a salesQuoteLines object in the response body.

Example
Request
Here is an example of the request.

GET
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})/salesQuoteLines(docum
entId=({id}),sequence={number}))

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "1896-S",
"displayName": "ATHENS Desk",
"description": null
},
"description": "ATHENS Desk",
"unitOfMeasureId": "id-value",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 6165,
"quantity": 1,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6165,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 0,
"amountIncludingTax": 6165,
"netAmount": 6165,
"netTaxAmount": 0,
"netAmountIncludingTax": 6165
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote Line
Create Sales Quote Line
Update Sales Quote Line
Delete Sales Quote Line
Create salesQuoteLines
3/23/2018 • 1 min to read • Edit Online

Create a sales quote line object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/salesQuotes({id})/salesQuoteLines

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a salesQuoteLines object.

Response
If successful, this method returns 201 Created response code and a salesQuoteLines object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})/salesQuoteLines
Content-type: application/json

{
"itemId": "id-value",
"lineType": "Item",
"quantity": 9
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote Line
Get Sales Quote Line
Update Sales Quote Line
Delete Sales Quote Line
Update salesQuoteLines
3/23/2018 • 1 min to read • Edit Online

Update the properties of a sales quote line object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/salesQuotes({id})/salesQuoteLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesQuoteLines, the salesQuoteLines will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated salesQuoteLines object in the
response body.

Example
Request
Here is an example of the request.

PATCH
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})/salesQuoteLines(docum
entId=({id}),sequence=({number}))
Content-type: application/json

{
"description": "someText"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"documentId": "id-value",
"sequence": 10000,
"itemId": "id-value",
"accountId": "id-value",
"lineType": "Item",
"lineDetails": {
"number": "1896-S",
"displayName": "ATHENS Desk",
"description": null
},
"description": "someText",
"unitOfMeasure": {
"code": "BOX",
"displayName": "Box",
"symbol": null,
"unitConversion": null
},
"unitPrice": 6165,
"quantity": 1,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 6165,
"taxCode": "VAT10",
"taxPercent": 10,
"totalTaxAmount": 0,
"amountIncludingTax": 6165,
"netAmount": 6165,
"netTaxAmount": 0,
"netAmountIncludingTax": 6165
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote Line
Get Sales Quote Line
Create Sales Quote Line
Delete Sales Quote Line
Delete salesQuoteLines
3/23/2018 • 1 min to read • Edit Online

Delete a sales quote line object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/salesQuotes({id})/salesQuoteLines(documentId=({id}),sequence=
({number}))

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
salesQuoteLines, the salesQuoteLines will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE
https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/salesQuotes({id})/salesQuoteLines(docu
mentId=({id}),sequence=({number}))

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Sales Quote Line
Get Sales Quote Line
Create Sales Quote Line
Update Sales Quote Line
shipmentMethods resource type
3/23/2018 • 1 min to read • Edit Online

Represents a method of shipment in Dynamics 365 Business Central, such as UPS, Fedex, and DHL.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET shipmentMethods shipmentMethods Gets a shipment method.

POST shipmentMethods shipmentMethods Creates a shipment method.

PATCH shipmentMethods shipmentMethods Updates a shipment method.

DELETE shipmentMethods none Deletes a shipment method.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the shipmentMethod.


Non-editable.

code string Specifies the shipment method code.

displayName string Specifies the shipment method display


name.

lastModifiedDateTime datetime The last datetime the shipment method


was modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the shipmentMethod.
{
"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Shipment Methods
Create Shipment Methods
Update Shipment Methods
Delete Shipment Methods
Get shipmentMethods
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a shipment method object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/shipmentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a shipmentMethods object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/shipmentMethods({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "PICKUP",
"displayName": "Pickup at Location",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Shipment Methods
Create Shipment Methods
Update Shipment Methods
Delete Shipment Methods
Create shipmentMethods
3/23/2018 • 1 min to read • Edit Online

Create a shipment method object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/shipmentMethods

Optional query parameters


Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a shipmentMethods object.

Response
If successful, this method returns 201 Created response code and a shipmentMethods object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/shipmentMethods
Content-type: application/json

{
"code": "PICKUP",
"displayName": "Pickup at Location"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"code": "PICKUP",
"displayName": "Pickup at Location",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Shipment Methods
Get Shipment Methods
Update Shipment Methods
Delete Shipment Methods
Update shipmentMethods
3/23/2018 • 1 min to read • Edit Online

Update the properties of a shipment method object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/shipmentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
shipmentMethods, the shipmentMethods will not be
updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated shipmentMethods object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/shipmentMethods({id})
Content-type: application/json

{
"displayName": "Pickup at Store Location"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "PICKUP",
"displayName": "Pickup at Store Location",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Shipment Methods
Get Shipment Methods
Create Shipment Methods
Delete Shipment Methods
Delete shipmentMethods
3/23/2018 • 1 min to read • Edit Online

Delete a shipment method object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/shipmentMethods({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
shipmentMethods, the shipmentMethods will not be
updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204,No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/shipmentMethods({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Shipment Methods
Get Shipment Methods
Create Shipment Methods
Update Shipment Methods
taxAreas resource type
3/23/2018 • 1 min to read • Edit Online

Represents a tax area resource type in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET taxAreas taxAreas Gets a tax area object.

POST taxAreas taxAreas Creates a tax area object.

PATCH taxAreas taxAreas Updates a tax area object.

DELETE taxAreas none Deletes a tax area object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the tax area. Non-


editable.

code string, maximum size 20 The code of the tax area.

displayName string, maximum size 50 The display name of the tax area.

lastModifiedDateTime datetime The last datetime the tax area was


modified. Read-Only.

Relationships
JSON representation
Here is a JSON representation of the resource.

{
"id": "GUID",
"code": "String",
"displayName": "String",
"lastModifiedDateTime": "datetime"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Tax Area
Create Tax Area
Update Tax Area
Delete Tax Area
Get taxAreas
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a tax area object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/taxAreas({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a taxAreas object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxAreas({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "28012001T",
"displayName": "tax area",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Area
Create Tax Area
Update Tax Area
Delete Tax Area
Create taxAreas
3/23/2018 • 1 min to read • Edit Online

Creates a tax area object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/taxAreas({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a taxAreas object.

Response
If successful, this method returns 201 Created response code and a taxAreas object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxAreas
Content-type: application/json

```json
{
"code": "44442001T"
}

Response

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"code": "44442001T",
"displayName": "tax area",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Area
Get Tax Area
Update Tax Area
Delete Tax Area
Update taxAreas
3/23/2018 • 1 min to read • Edit Online

Update the properties of a tax area object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/taxAreas({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the taxAreas,
the taxAreas will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated taxAreas object in the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxAreas({id})
Content-type: application/json

{
"code": "28012001T",
"displayName": "tax area",
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "28012001T",
"displayName": "tax area",
"lastModifiedDateTime": "2017-05-17T11:30:01.313Z"
}

See also
Microsoft Graph Reference
Delete taxAreas
3/23/2018 • 1 min to read • Edit Online

Delete a tax area object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/taxAreas({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the taxAreas,
the taxAreas will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxAreas({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Area
Get Tax Area
Create Tax Area
Update Tax Area
taxGroups resource type
3/23/2018 • 1 min to read • Edit Online

Represents a taxGroups resource type in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET taxGroups taxGroups Gets a tax group object.

POST taxGroups taxGroups Creates a tax group object.

PATCH taxGroups taxGroups Updates a tax group object.

DELETE taxGroups none Deletes a tax group object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the taxGroup. Read-


Only.

code string Specifies the tax group.

displayName string Specifies the tax group display name.

lastModifiedDateTime datetime The last datetime the tax group was


modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the taxGroup.
{
"id": "GUID",
"code": "string",
"displayName": "string",
"lastModifiedDateTime": "datetime"
}

See Also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Tax Groups
Create Tax Groups
Update Tax Groups
Delete Tax Groups
Get taxGroups
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a tax groups object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/taxGroups({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a taxGroups object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxGroups({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "FURNITURE",
"displayName": "Taxable Olympic Furniture",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See Also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Groups
Create Tax groups
Update Tax Groups
Delete Tax Groups
Create taxGroups
3/23/2018 • 1 min to read • Edit Online

Create a tax groups object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/taxGroups

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a taxGroups object.

Response
If successful, this method returns 201 Created response code and a taxGroups object in the response body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxGroups
Content-type: application/json

{
"code": "FURNITURE",
"displayName": "Taxable Olympic Furniture"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "FURNITURE",
"displayName": "Taxable Olympic Furniture",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See Also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Groups
Get Tax Groups
Update Tax Groups
Delete Tax Groups
Update taxGroups
3/23/2018 • 1 min to read • Edit Online

Update the properties of a tax groups object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/taxGroups({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the taxGroups,
the taxGroups will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated taxGroups object in the response
body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxGroups({id})
Content-type: application/json

{
"displayName": "Taxable Furniture"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "FURNITURE",
"displayName": "Taxable Furniture",
"lastModifiedDateTime": "2017-03-15T02:20:57.09Z"
}

See Also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Groups
Get Tax Groups
Create Tax Groups
Delete Tax Groups
Delete taxGroups
3/23/2018 • 1 min to read • Edit Online

Delete a tax group object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/taxGroups({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the taxGroups,
the taxGroups will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204,No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/taxGroups({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See Also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Tax Groups
Get Tax Groups
Create Tax Groups
Update Tax Groups
trialBalance resource type
3/23/2018 • 1 min to read • Edit Online

Represents a trial balance in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET trialBalance trialBalance Gets a trial balance object.

Properties
PROPERTY TYPE DESCRIPTION

number string The G/L Account number for the


trialBalance item

display string The G/L Account name for the


trialBalance item.

totalDebit string Represents total debit amount in G/L


Account.

totalCredit string Represents total credit amount in G/L


Account.

balanceAtDateDebit string Represents positive Balance at Date


amount in G/L Account.

balanceAtDateCredit string Represents negative Balance at Date


amount in G/L Account.

dateFilter date The date filter used to calculate the


trialBalance items.

Relationships
None

JSON representation
Here is a JSON representation of the resource.
{
"number": "string",
"display": "string",
"totalDebit": "string",
"totalCredit": "string",
"balanceAtDateDebit": "string",
"balanceAtDateCredit": "string",
"dateFilter": "date"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Trial Balance
Get trialBalance
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a trial balance report object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/trialBalance

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a trialBalance object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/trialBalance?$orderby
number&$filter=dateFilter ge 2019-01-01 and dateFilter le 2019-12-31

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"number": "1110",
"display": "Accounts Receivable",
"totalDebit": "0.00",
"totalCredit": "0.00",
"balanceAtDateDebit": "72,893.84",
"balanceAtDateCredit": "0.00",
"dateFilter": "2019-12-31"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Trial Balance
unitsOfMeasure resource type
3/23/2018 • 1 min to read • Edit Online

Represents a unit of measure, which is a standard of measurement of a quantity, in Dynamics 365 Business
Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET unitsOfMeasure unitsOfMeasure Gets a unit of measure object.

POST unitsOfMeasure unitsOfMeasure Creates a unit of measure object.

PATCH unitsOfMeasure unitsOfMeasure Updates a unit of measure object.

DELETE unitsOfMeasure none Deletes a unit of measure object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the unitsOfMeasure.


Non-editable.

code string Specifies the code for the unit of


measure.

displayName string Specifies the unit of measure's display


name.

internationalStandardCode string Specifies the unit of measure code


expressed according to the UNECE
Rec20 standard in connection with
electronic sending of sales documents.

lastModifiedDateTime datetime The last datetime the unit of measure


was modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the unitsOfMeasure resource.

{
"id": "GUID",
"code": "string",
"displayName": "string",
"internationalStandardCode": "string",
"lastModifiedDateTime": "datetime"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Units of Measure
Create Units of Measure
Update Units of Measure
Delete Units of Measure
Get unitsOfMeasure
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a units of measure object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/unitsOfMeasure({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a unitsOfMeasure object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/unitsOfMeasure({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"id": "id-value",
"code": "PCS",
"displayName": "Piece",
"internationalStandardCode": "EA",
"lastModifiedDateTime": "2017-03-15T01:21:09.563Z"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Units of Measure
Create Units of Measure
Update Units of Measure
Delete Units of Measure
Create unitsOfMeasure
3/23/2018 • 1 min to read • Edit Online

Create a units of measure object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/unitsOfMeasure

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a unitsOfMeasure object.

Response
If successful, this method returns 201 Created response code and a unitsOfMeasure object in the response
body.

Example
Request
Here is an example of a request.

POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/unitsOfMeasure
Content-type: application/json

{
"code": "PCS",
"displayName": "Piece",
"internationalStandardCode": "EA"
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 201 Created
Content-type: application/json

{
"id": "id-value",
"code": "PCS",
"displayName": "Piece",
"internationalStandardCode": "EA",
"lastModifiedDateTime": "2017-03-15T01:21:09.563Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Units of Measure
Get Units of Measure
Update Units of Measure
Delete Units of Measure
Update unitsOfMeasure
3/23/2018 • 1 min to read • Edit Online

Update the properties of a units of measure object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/unitsOfMeasure({id})

Request headers
HEADER VALUE

Authorization Bearer. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
unitsOfMeasure, the unitsOfMeasure will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated unitsOfMeasure object in the
response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/unitsOfMeasure({id})
Content-type: application/json

{
"displayName": "One Piece"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"code": "PCS",
"displayName": "One Piece",
"internationalStandardCode": "EA",
"lastModifiedDateTime": "2017-03-15T01:21:09.563Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Units of Measure
Get Units of Measure
Create Units of Measure
Delete Units of Measure
Delete unitsOfMeasure
3/23/2018 • 1 min to read • Edit Online

Deletes a units of measure object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/unitsOfMeasure({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the
unitsOfMeasure, the unitsOfMeasure will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/unitsOfMeasure({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Units of Measure
Get Units of Measure
Create Units of Measure
Update Units of Measure
vendors resource type
3/23/2018 • 1 min to read • Edit Online

Represents a vendor in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET vendors vendors Gets a vendor object.

POST vendors vendors Creates a vendor object.

PATCH vendors vendors Updates a vendor object.

DELETE vendor none Deletes a vendor object.

Properties
PROPERTY TYPE DESCRIPTION

id GUID The unique ID of the vendor. Non-


editable.

number string The vendor number.

displayName string The vendor's display name.

address NAV.PostalAddress The vendor's address.

phoneNumber string The vendor's telephone number.

email string The vendor's email address.

website string The vendor's website address.

taxRegistrationNumber string The vendor's tax registration number.

currencyId GUID The default currency code ID for the


vendor.

currencyCode string The default currency code for the


vendor.
PROPERTY TYPE DESCRIPTION

irs1099Code string Specifies a 1099 code for the vendor. US


only.

paymentTermsId GUID The default payment terms ID for the


vendor.

paymentTerms NAV.PaymentTerms The default payment terms for the


vendor.

paymentMethodId GUID The default payment method ID for the


vendor.

paymentMethod NAV.PaymentMethod The default payment method for the


vendor.

taxLiable boolean Specifies if the vendor is liable for tax.

blocked string Specifies which transactions with the


vendor that cannot be posted.
Accepted values are blank, Payment or
All

balance decimal The vendor's balance. Read-Only.

lastModifiedDateTime datetime The last datetime the vendor was


modified. Read-Only.

Relationships
None

JSON representation
Here is a JSON representation of the vendor.

{
"id": "GUID",
"number": "string",
"displayName": "string",
"address": "NAV.PostalAddress",
"phoneNumber": "string",
"email": "string",
"website": "string",
"taxRegistrationNumber": "string",
"currencyId": "GUID",
"currencyCode": "string",
"irs1099Code": "string",
"paymentTermsId": "GUID",
"paymentTerms": "NAV.PaymentTermsType",
"paymentMethodId": "GUID",
"paymentMethod": "NAV.PaymentMethod",
"taxLiable": "boolean",
"blocked": "string",
"balance": "decimal",
"lastModifiedDateTime": "datetime"
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Vendor
Create Vendor
Update Vendor
Delete Vendor
Get vendors
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a vendor object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/vendors({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a vendors object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/vendors({id})

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
{
"id": "id-value",
"number": "40000",
"displayName": "Wide World Importers",
"address": {
"street": "51 Radcroft Road",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "toby.rhode@cronuscorp.net",
"website": "",
"taxRegistrationNumber": "",
"currencyId": "id-value",
"currencyCode": "USD",
"irs1099Code": "",
"paymentTermsId": "id-value",
"paymentTerms": {
"code": "CM",
"description": "Current Month"
},
"paymentMethodId": "id-value",
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"taxLiable": true,
"blocked": " ",
"balance": 0,
"lastModifiedDateTime": "2017-03-07T00:35:29.667Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Vendor
Create Vendor
Update Vendor
Delete Vendor
Create vendors
3/23/2018 • 1 min to read • Edit Online

Create a vendor object in Dynamics 365 Business Central.

HTTP request
POST /businesscentral/companies({id})/vendors

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

Request body
In the request body, supply a JSON representation of a vendors object.

Response
If successful, this method returns 201 Created response code and a vendors object in the response body.

Example
Request
Here is an example of a request.
POST https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/vendors
Content-type: application/json

{
"number": "40000",
"displayName": "Wide World Importers",
"address": {
"street": "51 Radcroft Road",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "toby.rhode@cronuscorp.net",
"website": "",
"taxRegistrationNumber": "",
"currencyCode": "USD",
"irs1099Code": "",
"paymentTerms": {
"code": "CM",
"description": "Current Month"
},
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"taxLiable": true,
"blocked": " "
}

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 201 Created


Content-type: application/json

{
"id": "id-value",
"number": "40000",
"displayName": "Wide World Importers",
"lastModifiedDateTime": "2015-11-09T02:14:32Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Vendor
Get Vendor
Update Vendor
Delete Vendor
Update vendors
3/23/2018 • 1 min to read • Edit Online

Update the properties of a vendor object for Dynamics 365 Business Central.

HTTP request
PATCH /businesscentral/companies({id})/vendors({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Content-Type application/json

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the vendors, the
vendors will not be updated.

Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not
included in the request body will maintain their previous values or be recalculated based on changes to other
property values. For best performance you shouldn't include existing values that haven't changed.

Response
If successful, this method returns a 200 OK response code and an updated vendors object in the response body.

Example
Request
Here is an example of the request.

PATCH https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/vendors({id})
Content-type: application/json

{
"displayName": "Wide World Importers Inc.",
"blocked": "Payment"
}

Response
Here is an example of the response.
NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
"id": "id-value",
"number": "40000",
"displayName": "Wide World Importers Inc.",
"address": {
"street": "51 Radcroft Road",
"city": "Atlanta",
"state": "GA",
"countryLetterCode": "US",
"postalCode": "31772"
},
"phoneNumber": "",
"email": "toby.rhode@cronuscorp.net",
"website": "",
"taxRegistrationNumber": "",
"currencyCode": "USD",
"irs1099Code": "",
"paymentTerms": {
"code": "CM",
"description": "Current Month"
},
"paymentMethod": {
"code": "BANK",
"description": "Bank Transfer"
},
"taxLiable": true,
"blocked": "Payment",
"balance": 0,
"lastModifiedDateTime": "2017-03-07T00:35:29.667Z"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Vendor
Get Vendor
Create Vendor
Delete Vendor
Delete vendors
3/23/2018 • 1 min to read • Edit Online

Delete a vendor object from Dynamics 365 Business Central.

HTTP request
DELETE /businesscentral/companies({id})/vendors({id})

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

If-Match Required. When this request header is included and the eTag
provided does not match the current tag on the vendors, the
vendors will not be updated.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns 204 No Content response code. It does not return anything in the response
body.

Example
Request
Here is an example of the request.

DELETE https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/vendors({id})

Response
Here is an example of the response.

HTTP/1.1 204 No Content

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Vendor
Get Vendor
Create Vendor
Update Vendor
vendorPurchases resource type
3/23/2018 • 1 min to read • Edit Online

Represents a vendor purchase in Dynamics 365 Business Central.

NOTE
For information about enabling APIs for Dynamics NAV see Enabling the APIs for Microsoft Dynamics NAV.

Methods
METHOD RETURN TYPE DESCRIPTION

GET vendorPurchases vendorPurchases Gets a vendor purchase object.

Properties
PROPERTY TYPE DESCRIPTION

vendorId GUID Represents the vendor ID.

vendorNumber string Represents the vendor number.

name string Represents the name of the vendor .

totalPurchaseAmount numeric Represents the vendor purchases.

dateFilter_FilterOnly date Represents the date filter for the vendor


purchases.

Relationships
None

JSON representation
Here is a JSON representation of the resource.

{
"vendorId": "GUID",
"vendorNumber": "string",
"name": "string",
"totalPurchaseAmount": "decimal",
"dateFilter_FilterOnly": "date"
}

See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Get Vendor Purchases
Get vendorPurchases
3/23/2018 • 1 min to read • Edit Online

Retrieve the properties and relationships of a vendor purchases report object for Dynamics 365 Business Central.

HTTP request
GET /businesscentral/companies({id})/vendorPurchases

Request headers
HEADER VALUE

Authorization Bearer {token}. Required.

Request body
Do not supply a request body for this method.

Response
If successful, this method returns a 200 OK response code and a vendorPurchases object in the response body.

Example
Request
Here is an example of the request.

GET https://api.businesscentral.dynamics.com/v1.0/api/beta/companies({id})/vendorPurchases

Response
Here is an example of the response.

NOTE
The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

{
"vendorId": "id-value",
"vendorNumber": "10000",
"name": "Fabrikam, Inc.",
"totalPurchaseAmount": 21632.25,
"dateFilter_FilterOnly": null
}
See also
Graph Reference
Working with Dynamics 365 Business Central in Microsoft Graph
Enabling the APIs for Microsoft Dynamics NAV
Endpoints for the APIs
Error Codes
Vendor Purchases

S-ar putea să vă placă și