You are on page 1of 433

Contents

Welcome to the Developer and IT-Pro Help


Getting Started
Getting Started
Resources for Help and Support
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
Determine the Number of Licensed Sessions
Development in C/AL
Application Design Overview
Programming in C/AL
Objects
Tables
Codeunits
Pages
Overview
Create a Page
FactBoxes
Actions
Arrange Fields in Rows and Columns
Cues
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
Object Specifications and Limitations
C/AL Functions
Functions Not Supported by Microsoft Dynamics NAV Web Client
Automation Data Type
BigInteger Data Type
BigText Data Type
BLOB Data Type
Boolean Data Type
Byte Data Type
Char Data Type
Code Data Type
Codeunit Data Type
Database
Dates and Times
Date Data Type
DateFormula Data Type
DateTime Data Type
Duration Data Type
Time Data Type
Date and Time Functions
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)
DateTime Functions
Debugger
Decimal Data Type
Dialog Data Type
FieldRef Data Type
File Data Type
FilterPageBuilder Data Type
GUID Data Type
InStream and OutStream Data Types
InStream
OutStream
Integer Data Type
KeyRef Data Type
Media Data Type
MediaSet Data Type
NAV App
Notification Data Type
Numbers
OCX Data Type
Option Data Type
Page Data Type
Query Data Type
Record Data Type
RecordID Data Type
RecordRef Data Type
Report Data Type
Sessions
Strings
System
TableConnectionType Data Type
TaskScheduler Data Type
TableFilter Data Type
Test Pages
TestPage Data Type
TestRequestPage Data Type
Text Data Type
TransactionType Data Type
Variant Data Type
XMLport Data Type
Properties
Codeunit Properties
MenuSuite Properties
Page Properties
Query Properties
Report Properties
Table Properties
XMLport Properties
VariableName Properties
Key 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
Server Trace Events List
Server Admin and Operational Events List
Using Event Viewer
Using Performance Monitor
Using PerfView
Using Logman
Using PowerShell
Turn Off or Limit Telemetry Trace 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 Belgian 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
Business Central API Reference v1.0
Business Central API Reference v2.0
Welcome to the Developer and IT-Pro Help for
Microsoft Dynamics NAV
12/15/2022 • 2 minutes to read

IMPORTANT
The content in this section applies to Microsoft Dynamics NAV 2018. The product itself follows the Fixed Lifecycle Policy.
However, this content is no longer maintained or supervised by Microsoft. For more current documentation, see
Dynamics 365 Business Central.

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 can use Microsoft Dynamics NAV 2018 to develop for Dynamics 365 Business Central up to and including version 14.

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 Administration


Microsoft Dynamics NAV 2018

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


properties and APIs

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


triggers, properties, development environment commands,
and development environment windows

Learn how to develop with the new development Getting Started


environment

See Also
System Requirements for Microsoft Dynamics NAV
Extending Microsoft Dynamics NAV Using Extension Packages
Resources for Help and Support
Accessibility
Terms of Use
Developer and IT-Pro Help for Dynamics 365 Business Central
Getting Started
12/15/2022 • 2 minutes to read

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 Deployment


Dynamics 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 Touring the RoleTailored Client for Developers
from the perspective of a developer

Learn about the Microsoft Dynamics NAV Web client from Microsoft Dynamics NAV Web Client
the 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, Technical Reference


triggers, properties, development environment commands,
and development environment windows

Watch videos to learn more about development and UI on Microsoft Dynamics NAV Dev Center
the MSDN Dev Center for Dynamics NAV
Resources for Help and Support for Dynamics NAV
12/15/2022 • 2 minutes to read

As a Dynamics NAV partner, you have access to resources that can help you support your Dynamics NAV
customers, and you have access to resources that can help you be more productive as a partner.
This page outlines the resources available to you.

Product Help
The functionality in the default version of Dynamics NAV is described on the Docs.microsoft.com site as
described in the following table.

NAME LO C AT IO N DESC RIP T IO N

Business functionality docs Microsoft Dynamics NAV Use this library to learn about business
documentation functionality.

Development and administration docs Developer and IT-Pro Help for Use this content to learn how to
Microsoft Dynamics NAV extend, customize, and administrate
Dynamics NAV.

Customize and extend the user assistance


Users have access to tooltips that can help them get unblocked, and context-sensitive links to learn more
according to the Dynamics NAV user assistance model. If you customize or extend Dynamics NAV, you are
expected to also customize the user assistance so that users will have access to content that can help them get
started, get unblocked, and learn more. For more information, see User Assistance Model for Dynamics 365
Business Central.
Product versions and Help versions
In general, the Dynamics NAV content on the Docs.microsoft.com site reflects the latest version of Dynamics
NAV online with limited support for earlier versions.
If you support Dynamics NAV customers, your solution might be older than the latest version. This means that
the content in the business functionality docs might describe functionality that your users do not have access to.
For a better experience, you can deploy a website based on Help Server and, optionally, add content from the
Dynamics NAV or Dynamics 365 Business Central GitHub repos in addition to any content that you have
otherwise contributed. For more information, see Working with Dynamics NAV Help Server.

Support
As a Dynamics NAV reselling partner, you are the first line of support.
Summary of where to file bugs and issues
As a partner, you have different support channels depending on what type of issue you want support for.

ISSUE T Y P E SIT E

Report bug in supported in-market versions of Dynamics The Support for business site
NAV
ISSUE T Y P E SIT E

Collaboration on the AL language and developer experience The AL Developer Preview GitHub repo

Resources
As a partner, you can keep on top of current and upcoming capabilities, and you can share Microsoft's roadmap
with your prospects, for example. This section provides links to places to keep track of for people who are new
to Dynamics NAV as well as for people who have been working with the product for years.
Dynamics NAV blog posts
The Dynamics 365 blog is where Microsoft publishes announcements, updates, and tips and tricks, including for
Dynamics NAV.

NAME LO C AT IO N DESC RIP T IO N

Dynamics NAV on the Dynamics 365 https://cloudblogs.microsoft.com/dyna Use this blog to learn about
blog mics365/it/product/nav/ opportunities, processes, and tools for
the Dynamics NAV partner community.
Some older blog posts are still
available on the Community site.

Dynamics NAV communities


On the Dynamics NAV Community site, you have access to the Dynamics NAV Forum. You can use this forum to
submit a question and learn from other community members. MVPs, partners, and Microsoft employees
participate in the conversations.
You can also join the BCUG/NAVUG User Group for Dynamics 365 Business Central and Dynamics NAV, which is
a user-led, user-driven community of more than 26,000 users, partners, and MVPs.

See also
Welcome to the Developer and IT-Pro Help for Microsoft Dynamics NAV
Getting Started
Touring the RoleTailored Client for Developers
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 14 minutes to read

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.

IT EM REQ UIREM EN T S

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


64-bit editions)
Windows 10 Pro, Enterprise, or Education (32-bit and
64-bit editions).
Impor tant: Windows 10 S is not supported.
Windows 8.1 Professional or Enterprise (32-bit and
64-bit editions).
Windows Server 2022
Windows Server 2019
Windows Server, version 1809 or later
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
IT EM REQ UIREM EN T S

Instant messaging and Telephony API Microsoft Lync 2013.

Outlook client integration and mail merge Microsoft Microsoft 365, Microsoft Office 2019,
Microsoft Office 2016, or Microsoft Office 2013
Service Pack 1 (SP1).

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

Editing in Excel using the Excel Add-in Excel 2019 or Excel 2016.
For more information, see Setting up the Excel Add-
In for Editing Dynamics NAV Data.

OneNote integration Microsoft Office 2019, Microsoft Office 2016, or


Microsoft Office 2013 SP1.

Email logging Active Directory and Microsoft Exchange Server


2019, Exchange Server 2016, or Exchange Server
2013.
Microsoft Exchange Online, or Exchange Online as
part of a Microsoft 365 subscription.

Additional software Microsoft .NET Framework 4.7 or 4.8.

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.

IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S

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


64-bit editions)
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 2022
Windows Server 2019
Windows Server, version 1809 or later
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 later,
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.
Impor tant: 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 or 4.8.


IT EM REQ UIREM EN T S

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
(cumulative update 40 and earlier). Report
Builder 15.0 for SQL Server 2019 (cumulative
update 41 and later)

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.

* Starting with cumulative update 41, SQL Server Native Client is no longer be installed by Setup or included on
the installation media (DVD). This change doesn't affect the Microsoft Dynamics NAV Development Environment
installation if you upgrading from an earlier version, because the prerequisite should already have been
installed. However, for a clean installation of the Microsoft Dynamics NAV Development Environment, you'll
have to manually install the SQL Server Native Client; otherwise, you may experience problems connecting the
Microsoft Dynamics NAV Development Environment to the database. For more information about how to install
this prerequisite, see Installation Notes.
Dynamics NAV Web Client Requirements
The following table shows the minimum system requirements for the Dynamics NAV Web client.

IT EM REQ UIREM EN T S

Supported browsers Microsoft Edge


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

Business inbox in Outlook Microsoft Microsoft 365.

Sending data to Excel Microsoft Office 2019, Microsoft Office 2016,


Microsoft Office 2013 SP1, or Microsoft Microsoft
365.

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

For more information, see Setting up the Excel Add-


In for Editing Dynamics NAV Data.

SharePoint Online links Microsoft Office 2019, Microsoft Office 2016,


Microsoft Office 2013 SP1, or Microsoft Microsoft
365.
IT EM REQ UIREM EN T S

Printing reports to Excel or Word Microsoft Office 2019, Microsoft Office 2016,
Microsoft Office 2013 SP1, or Microsoft Microsoft
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. Similarly,
if you use zoom functionality in your browser or from a
third-party tool, then elements may appear (or disappear)
depending on screen size.

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.

IT EM REQ UIREM EN T S

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 or later)
for Windows 10 and for Windows 8.1 (32-bit and 64-
bit versions)
Google Chrome for Windows (61.0 or later)
Mozilla Firefox 55.0 for Windows (55.0 or later)
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.

IT EM REQ UIREM EN T S

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 2016 or later, or Microsoft Microsoft
365 is required for sending data to Microsoft Excel or
to Microsoft Word.
IT EM REQ UIREM EN T S

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.

IT EM REQ UIREM EN T S

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


edition)
Windows 10 Pro, Enterprise, or Education (64-bit
edition).
Windows Server 2022 Standard or Datacenter.
Windows Server 2019 Standard, Essentials, or
Datacenter.
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 Foundation.


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 or 4.8


Windows PowerShell 4.0.
IT EM REQ UIREM EN T S

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 Foundation*.
Report Builder for SQL Server 2016
(cumulative update 40 and earlier). Report
Builder 15.0 for SQL Server 2019 (cumulative
update 41 and later)

This is not installed if a version of SQL Server


Report Builder or Microsoft Visual Studio is
already present on the target computer.

* Starting with cumulative update 41, Windows Identity Foundation is added to the product by Nuget. It's not
installed by Setup.
Dynamics NAV Web Server Components Requirements
IT EM REQ UIREM EN T S

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


edition)
Windows 10 Pro, Enterprise, or Education (64-bit
edition).
Windows Server 2022 Standard or Datacenter.
Windows Server 2019 Standard, Essentials, or
Datacenter.
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 or 4.8.


Windows PowerShell 4.0.
IT EM REQ UIREM EN T S

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.

IT EM REQ UIREM EN T S

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


edition)
Windows 10 Pro, Enterprise, or Education (64-bit
edition).
Windows Server 2022 Standard or Datacenter.
Windows Server 2019 Standard, Essentials, or
Datacenter.
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.
IT EM REQ UIREM EN T S

SQL Server Microsoft SQL Server 2019 Express, Standard or


Enterprise.
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.

IT EM REQ UIREM EN T S

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


edition)
Windows 10 Pro, Enterprise, or Education (64-bit
editions).
Windows 8.1 Professional or Enterprise (64-bit
edition).
Windows Server 2022 Standard or Datacenter.
Windows Server 2019
Windows Server, version 1809 or later
Windows Server 2016 Standard, Essentials, or
Datacenter.
Windows Server 2012.
Windows Server 2012 Essentials.

Hardware resource Hard disk space: 500 MB.


Memory: 2 GB.
IT EM REQ UIREM EN T S

Web server Internet Information Server 10, Internet Information


Server 8.5, or Internet Information Server 8.0.

Additional software Microsoft .NET Framework 4.7 or 4.8.

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.

IT EM REQ UIREM EN T S

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.

IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S

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 2019
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.

IT EM REQ UIREM EN T S

Supported Outlook Applications Outlook 2019


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

Supported Exchange Servers Exchange Server 2019


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.

IT EM REQ UIREM EN T S

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.

IT EM REQ UIREM EN T S

Supported operating systems Windows 8.1 Professional or Enterprise (32-bit and


64-bit editions).
Windows Server 2019
Windows Server, version 1809 or later
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
12/15/2022 • 2 minutes to read

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.

C O M P O N EN T P URP O SE

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 The components that are needed to enable Microsoft
Server 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
12/15/2022 • 4 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 4 minutes to read

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.

IT EM SO A P W EB SERVIC ES O DATA W EB SERVIC ES

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 Ser vices 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 Ser vices 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 Ser vicesOptionFormat setting to specify how Microsoft Dynamics NAV Server
must understand option values. If you set the Ser vicesOptionFormat 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 Ser vices
Language setting.

NOTE
In earlier versions of Dynamics NAV, you could enable Ser vicesCultureDefaultUserPersonalization 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:

https://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)
12/15/2022 • 2 minutes to read

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 AccessControlSer vice
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
12/15/2022 • 2 minutes to read

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
https://MyServer:49000/main.aspx?lang=en&content=across-get-started.html. You can save the URL as a
favorite in your browser, and you can save links to individual Help topics such as
https://MyServer:49000/Main.aspx?lang=en&content=ui-across-business-areas.html.
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 DESC RIP T IO N EXA M P L E

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 across-get-started.html


the relevant Help content.

In the standard Help, most Help topics have easily recognizable file names, such as across-get-started.html for
the conceptual overview that is called Getting Started.

Versions older than Microsoft Dynamics NAV 2017


In the standard Help for older versions of Dynamics NAV, many file names for topics had a prefix that identifies
the type of content that the topic contains. The following table describes the prefixes for file names.
NAME DESC RIP T IO N

con The topic contains a conceptual overview.

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 6 minutes to read

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.

N O. O F B USIN ESS
IN C L UDES A P P L IC AT IO N DATA B A SES P ER N O. O F C O M PA N IES IN M ULT IT EN A N T
DATA B A SE A P P L IC AT IO N DATA B A SE B USIN ESS DATA B A SE DEP LO Y M EN T

No 1 1 No

Yes 1 1 No

Yes 1 2 No

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:

https://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:

https://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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 3 minutes to read

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
12/15/2022 • 2 minutes to read

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.
SQL Server Native Client for Microsoft Dynamics NAV Development Environment
Starting with Dynamics NAV 2018 cumulative update 41 and Dynamics NAV 2017cumulative
update 54, the prerequisite SQL Server Native Client is no longer installed by Setup or included on
the installation media (DVD). This change doesn't affect the Microsoft Dynamics NAV Development
Environment installation if you upgrading from an earlier version, because the prerequisite should
already have been installed. However, for a clean installation of the Microsoft Dynamics NAV
Development Environment, you'll have to manually install the SQL Server Native Client; otherwise,
you may experience problems connecting the Microsoft Dynamics NAV Development Environment
to the database. To install the SQL Server Native Client, follow these steps:
1. Download an earlier cumulative update to the computer where you're installing
development environment.
For Dynamics VAV 2018, go to Released Cumulative Updates for Microsoft Dynamics NAV
2018
For Dynamics NAV 2017, go to Released Cumulative Updates for Microsoft Dynamics NAV
2017
2. Unzip the files.
3. Open the DVD\Prerequisite Components\Microsoft SQL Ser ver folder , then double-
click either the sqlncli.msi or sqlncli64.msi, depending on whether the computer has an 86-
bit or 64-bit operating system respectively.
4. Follow the instructions.
Report Builder with Dynamics NAV 2018 cumulative update 41 or later
Starting with Dynamics NAV 2018 cumulative update 41, the Setup installation program installs Report
Builder 15.0 for SQL Server 2019, instead of Report Builder for SQL Server 2016. If Report Builder for
SQL Server 2016 is already installed on your computer it will be updated to Report Builder 15.0.

NOTE
If you install Dynamics NAV 2018 cumulative update 41 or later on a computer that is also running an older
Dynamics NAV version, you won't be able to use Report Builder in the Microsoft Dynamics NAV Development
Environment for the older version. In this case, switch the development environment use the Visual Studio Report
extension. To change to the Visual Studio Report extension, choose Tools > Options > Use Repor t Builder >
No .

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 10 minutes to read

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
Director y Users and Computers , and choose Add .
If you do not see Active Director y Users and Computers in the list of available snap-ins, you
may need to use Server Manager to install the Active Director y Domain Ser vices role on your
server computer.
2. In MMC, select Active Director y 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 Proper ties , 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 Director y 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 <allowAccounts> 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 <allowAccounts> 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 Ser ver (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 ser ver 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 Proper ties .
c. Under Select a page , choose Securables .
d. On the Explicit tab, select the Alter any event session and View ser ver 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 Proper ties .
c. Click on Ser ver 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 Proper ties . Then do the following in the Database Proper ties –
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 Proper ties – master dialog box.
e. Navigate the tree view: Databases , System Databases , master , Tables , System Tables .
f. Right-click the dbo.$ndo$sr vproper ty table and choose Proper ties .
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 Proper ties – dbo.$ndo$sr vproper ty 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 Proper ties .
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]
GRANT VIEW SERVER STATE TO [domain\accountname]
GRANT ALTER ANY EVENT SESSION TO [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
12/15/2022 • 6 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 5 minutes to read

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
12/15/2022 • 2 minutes to read

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.

SC EN A RIO DESC RIP T IO N

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 in a Single Computer Environment components, 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 in a Two Computer Environment components 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 in a Three Computer Environment components, Microsoft Dynamics NAV Server, and the SQL
Server database components on three separate computers.

IMPORTANT
The Dynamics NAV doesn't support Azure Active Directory Application Proxy, because Application Proxy doesn't fully
support web wockets.
See Also
How to: Install the Web Server Components
How to: Install the Web Server Components using
Setup Wizard
12/15/2022 • 6 minutes to read

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 Ser ver Components , and then choose Run
from My Computer .
8. Choose the Next button to go to the Specify Parameters page.
9. In the Ser ver section, set the following parameters to configure the Microsoft Dynamics NAV Server
instance.

PA RA M ET ER DESC RIP T IO N

Ser ver Name Specifies the name of the computer that is running
Microsoft Dynamics NAV Server for this client.

Client Ser vices Por t The listening TCP port for the computer that is running
Microsoft Dynamics NAV Server.

Ser vice 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 Ser ver Components section, set the Por t 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 Star t menu for opening the Microsoft Dynamics NAV Web client, set
the Add link to Star t menu parameter to Yes .
12. Set the Install IIS prerequisites parameter to one of the following values.

VA L UE DESC RIP T IO N

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 Star t , 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:
https://localhost:port/ServiceName

Or for Microsoft Dynamics NAV 2017:


https://localhost:port/webclient

Replace port and ServiceName with that values that you chose during Setup. For example, the address
with the default installation is:
https://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
12/15/2022 • 5 minutes to read

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 Star t 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 Ser vices , .NET Framework 4.6
Advanced Ser vices , or .NET Framework 4.7 Advanced Ser vices , and then do the following:
Select ASP.NET 4.5 , ASP.NET 4.6 , or ASP.NET 4.7 .
Expand WCF Ser vices , 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 Ser vices , expand World Wide Web Ser vices , 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 Ser vices , 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
https://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 Star t page, choose Ser ver 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 ser ver page, select Select a ser ver from the ser ver pool , select your
server from Ser ver Pool list, and then choose the Next button.
6. In the Select Ser ver Roles window, select Web Ser ver (IIS) , and then choose the Next button.
7. If the Add features that are required for Web Ser ver (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 Ser vices , 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 Ser ver Role (IIS) page, choose the Next button.
14. On the Select role ser vices 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
https://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 > Ser ver Variables , and then add a
server variable that has the following settings:

NAME VA L UE REP L A C E

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
12/15/2022 • 2 minutes to read

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
Troubleshooting: The SAML2 token is invalid because its validity period ended.

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 19 minutes to read

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.

IMPORTANT
ClickOnce requires Microsoft .NET Framework 4.7.2.

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 Star t 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 Star t 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 Star t
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.7.2


The Microsoft Dynamics NAV Windows client requires .NET Framework 4.7.2. Depending on the version of
Windows, .NET 4.7.2 Framework might already be installed. If not, then you have two options:
1. Users themselves install .NET 4.7.2 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.7.2. However,
using this option requires that users have administrative rights on their computers.
2. An administrator installs install .NET 4.7.2 Framework on users computers.
For more information about how to install .NET 4.7.2 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.7.2 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.
7. 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.7.2 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.
8. 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.
9. (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.
10. Update the deployment manifest.
11. At the command promt, change the directory to ClickOnce Deployment folder, for example,
C:\fileshare\clickonce\Deployment.
12. 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

13. 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.
14. 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.
15. 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.

13. 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 .
14. 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 https:// 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 Star t 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 3 minutes to read

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
12/15/2022 • 2 minutes to read

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
Determine the Number of Licensed Sessions in a
Dynamics NAV Deployment
12/15/2022 • 4 minutes to read

This article describes how to determine the number of sessions for which you are licensed in Dynamics NAV. The
article was first published on CustomerSource and is now ported to the Docs.microsoft.com site.

Session Types
Two types of sessions exist in Dynamics NAV:
1. User sessions Used by users to log into Dynamics NAV
2. Application Server sessions Used by the Dynamics NAV Application Server

NOTE
Application server sessions cannot be used by users to log into Dynamics NAV.

You can determine the number of sessions for which you are licensed from one of the following resources:
1. License Information in the development environment
2. Licensed Sessions in Dynamics NAV

License Information in development environment


You can determine how many sessions you are licensed for in the License Information window in
development environment.
To access License Information in development environment, go to Tools , License Information .
In License Information , you can find the number of user sessions and application server sessions you are
licensed for by looking at the granules that are described

SESSIO N T Y P E L IC EN SE T Y P E GRA N UL E

User sessions BRL License - Business Essentials * Granule 1200 - NFR Sessions: 1
session included in granule 3010 -
Basic General Ledger

* Granule 410 - Additional BRL


Business Essentials Users shows the
number of user sessions purchased

* Total user sessions = number of


granule 410 + 1 from granule 1200
SESSIO N T Y P E L IC EN SE T Y P E GRA N UL E

BRL License - Advanced Management * Granule 1200 - NFR Sessions: Shows


1 session included in granule 3010 -
Basic General Ledger

* Granule 420 - Additional BRL


Advanced Management Users: Shows
the number of user sessions purchased

* Total user sessions = number of


granule 420 + 1 from granule 1200

MBLLicense * Granule 1200 - Additional


Professional Users: Shows total user
sessions. 1 session is included from
granule 3010 - Basic General Ledger,
the additional sessions are purchased
sessions. Granule 1200 summarizes all
sessions from granules 1,200, 1,210,
1,220, and 1,230.

* Total user sessions = number of


granule 1200

* Note : MBL Standard licenses also


contain session information in granule
1,201. However, granule 1,201 does
not include the user session that is
included in the Basic General Ledger
and therefore shows one session less
than granule 1,200.

Application Server sessions * One Application Server session is


included in granule 3010 - Basic
General Ledger. However, this session
does not show as an Application
Server granule in the granule list in
License Information.

* Granule 1415 – shows purchased


application server sessions

* Total application server sessions =


number of granule 1415 + 1

Licensed Sessions in development environment


The Licensed Sessions field in the Sessions window in development environment shows how many total
sessions, user sessions and application server sessions, you are licensed for.
To access Licensed Sessions , go to File , Database , Information , Sessions tab.
The Licensed Sessions field shows the total number of sessions included in a license, including both user and
application server sessions. Therefore, you cannot use this field to determine the number of only user sessions
or application server sessions.

License Permissions Page


To create a page that lists all object permissions for a license, follow these steps:
1. In development environment, go to Tools , Object Designer
2. Select Page , and then click New
3. Enter Permission Range or 2000000044 in the Table field
4. Select Create a page using a wizard
5. Select List
6. Click OK
7. Add all fields except Index
8. Select Finish
9. Save and close the page
This page will list all objects that the license currently uploaded to the database gives permissions for including
what kind of permission (Read, Insert, Modify and Delete) and what type of permission (Direct(Yes) or Indirect).

Protected Tables Report


Protected tables refer to those tables that can only be updated by objects with special permissions set. These
tables are generally ledger tables, register tables, and certain history tables like posted document tables. The
objects that have permission to update these tables (for example, posting routines and adjustment routines) can
be created or modified only by customers who have a development license. Customer and partner development
licenses give full read, insert, modify, and delete permissions for all base tables in the Dynamics NAV database.
Therefore, the report will not list any objects for these types of licenses.
To create a report listing all protected tables for a customer license, follow these steps:
1. In development environment, go to Tools , Object Designer
2. Select Repor t and then click New
3. Enter Permission Range or 2000000044 in the Table field
4. Select Create a repor t using a wizard
5. Select Tabular-Type Repor t Wizard
6. Click OK
7. Add all fields except Index
8. Select Finish
9. Go to View , C/AL Code or select F9
10. In the OnAfterGetRecord trigger enter the following code:

IF ("Insert Permission" <> "Insert Permission"::Indirect) AND


("Modify Permission" <> "Modify Permission"::Indirect) AND
("Delete Permission" <> "Delete Permission"::Indirect)
THEN
CurrReport.SKIP;

11. Save and close the report


12. To format the report correctly, design the report and go to View , Sections
13. To create a RDLC layout, design the report and go to Tools , Create Layout Suggestion .

See Also
Session Timeout Settings and Configuration for Dynamics NAV
Configuring Dynamics NAV Deployment
Development in Microsoft Dynamics NAV
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Entr y 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
12/15/2022 • 2 minutes to read

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 Tables
build your application.

Presenting the Data


TO SEE

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

Read about how to create reports in Report Dataset Reports


Designer and Visual Studio Report Designer.

Writing Code
TO SEE

Learn about codeunits, modifying codeunits, adding Codeunits


variables, 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Page Properties
in 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
12/15/2022 • 5 minutes to read

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 SUBT Y P E

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
12/15/2022 • 4 minutes to read

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 Proper ties .
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.

W H AT C ONF
THE IRM A STA N
W IZ A T IO N RO L E DA RD
RD C A RD DIA LO DO C U L IST P L IST P N AVIG C EN T DIA LO W O RK
DO ES C A RD PA RT G M EN T L IST A RT L US AT E ER G SH EET

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.
W H AT C ONF
THE IRM A STA N
W IZ A T IO N RO L E DA RD
RD C A RD DIA LO DO C U L IST P L IST P N AVIG C EN T DIA LO W O RK
DO ES C A RD PA RT G M EN T L IST A RT L US AT E ER G SH EET

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
FactB
ox
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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

C H A RA C T ERIST IC S GRIDL AY O UT F IXEDL AY O UT

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 configuration that has a row and
decide to set up fields in a row-by-row column headings. You can only set up
or 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
12/15/2022 • 2 minutes to read

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 Setting Up Colored Indicators on Cues
the 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
Ser vices 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
12/15/2022 • 2 minutes to read

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 Walkthrough: Exporting Data from Tables to XML
an XML document. Documents
TO SEE

Learn how to import data from an XML document to Walkthrough: Inserting Data from XML Documents to
multiple tables in a Dynamics NAV database. The XML Multiple Tables
document 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 SOAP Web Service URIs
with 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
services. of 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 Walkthrough: Creating a Web Service using Extension
the 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 Walkthrough: Viewing Page Data in Excel Using PowerPivot
Excel using Microsoft PowerPivot for Excel, which is a data (OData)
analysis 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
from Microsoft Azure Marketplace. NAV 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 5 minutes to read

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.

F UN C T IO N DESC RIP T IO N

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 determines where the 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, and will appear regardless of which
the page the user is viewing.

NOTE
GlobalScope is currently not supported. 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:

VA RIA B L E N A M E DATA T Y P E SUBT Y P E

Customer Record Customer

CreditBalanceNotification Notification

OpenCustomer Text

T EXT C O N STA N T N A M E C O N ST VA L UE

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:

VA RIA B L E N A M E DATA T Y P E SUBT Y P E

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
12/15/2022 • 2 minutes to read

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

F EAT URE DESC RIP T IO N 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
control add-ins that add custom NAV 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Walkthrough: Creating and Using a Client Control Add-in
control 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 4 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Customization in Dynamics NAV
365 for Sales entities.

Understand mapping limitations for option values in Handling Missing Option Values in Mapping
Microsoft Dynamics 365 for Sales and learn how to make
simple 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
customize integration. 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 3 minutes to read

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.

PA RA M ET ER DESC RIP T IO N

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.
PA RA M ET ER DESC RIP T IO N

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 Ser vices 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
12/15/2022 • 4 minutes to read

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 C L A SSIF IC AT IO N DESC RIP T IO N EXA M P L E

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,
including administrator contact tenant administrator’s name,
information, such as tenant address, e-mail address, phone
administrator’s name, address, or number)
phone number. Customer’s provisioning
information
DATA C L A SSIF IC AT IO N DESC RIP T IO N EXA M P L E

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 Tenant ID (non-GUID)


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

SystemMetadata Data generated while running the Database table names,


service or program that is not linkable database column names, entity
to a user or tenant. names

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
12/15/2022 • 6 minutes to read

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.

F UN C T IO N T Y P E P URP O SE

MessageHandler Handles MESSAGE statements.

ConfirmHandler Handles CONFIRM statements.

StrMenuHandler Handles STRMENU statements.

PageHandler Handles specific pages that are not run modally.


F UN C T IO N T Y P E P URP O SE

ModalPageHandler Handles specific pages that are run modally.

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. Mandator y 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
12/15/2022 • 3 minutes to read

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
12/15/2022 • 7 minutes to read

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 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.

VERSIO N DESC RIP T IO N

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

F EAT URE C H A RA C T ERIST IC

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 80


Authentication 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.

F EAT URE C H A RA C T ERIST IC

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


F EAT URE C H A RA C T ERIST IC

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


F EAT URE C H A RA C T ERIST IC

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


F EAT URE C H A RA C T ERIST IC

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
Ser ver 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

Indicates true or false .


For usability reasons, Boolean values are sometimes shown as Yes or No . For example, the two possible values
for the Inser tAllowed 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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)
SELECTLATESTVERSION 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

VA RIA B L E DATAT Y P E

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

VA RIA B L E DATAT Y P E

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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)
12/15/2022 • 3 minutes to read

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
DATEFORMULA. 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 1
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 2
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.

VA RIA B L E N A M E DATAT Y P E L EN GT H

Expr1 Text 30

Expr2 Text 30

Expr3 Text 30

RefDate Date Not applicable


VA RIA B L E N A M E DATAT Y P E L EN GT H

Date1 Date Not applicable

Date2 Date Not applicable

Date3 Date Not applicable

T EXT C O N STA N T EN U VA L UE

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)
12/15/2022 • 2 minutes to read

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 1
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 DATAT Y P E

Date1 Date

CloDate Date

NAME C O N ST VA L UE

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 2
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 DATAT Y P E

Date1 Date

CloDate1 Date

CloDate2 Date

NAME C O N ST VA L UE

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)
12/15/2022 • 2 minutes to read

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 DATAT Y P E

InputDate Date

Day Integer

Month Integer

Year Integer

NAME C O N ST VA L UE

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)
12/15/2022 • 2 minutes to read

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 2013 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.

VA RIA B L E N A M E DATAT Y P E

InputDate Date

DayOfWeek Integer
VA RIA B L E N A M E DATAT Y P E

WeekNumber Integer

Year Integer

T EXT C O N STA N T N A M E EN U VA L UE

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
12/15/2022 • 2 minutes to read

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 DATAT Y P E

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)
12/15/2022 • 2 minutes to read

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.

VA RIA B L E N A M E DATAT Y P E

Day Integer

Month Integer

Year Integer

OutputDate Date

T EXT C O N STA N T N A M E C O N ST VA L UE
T EXT C O N STA N T N A M E C O N ST VA L UE

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)
12/15/2022 • 3 minutes to read

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 1
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.

VA RIA B L E N A M E DATAT Y P E

DayOfWeek Integer

Week Integer
VA RIA B L E N A M E DATAT Y P E

Year Integer

OutputDate Date

T EXT C O N STA N T N A M E EN U VA L UE

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 2
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.

VA RIA B L E N A M E DATA T Y P E

DayOfWeek Integer

Week Integer

Year Integer

OutputDate Date

T EXT C O N STA N T EN U VA L UE

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 3
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.

VA RIA B L E N A M E DATAT Y P E

DayOfWeek Integer

Week Integer

OutputDate Date

T EXT C O N STA N T EN U VA L UE

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)
12/15/2022 • 2 minutes to read

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 1
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.

VA RIA B L E N A M E DATAT Y P E

InputDate Date

OutputDate Date

T EXT C O N STA N T N A M E EN U VA L UE

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 2
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.

VA RIA B L E N A M E DATAT Y P E

InputDate Date

OutputDate Date

T EXT C O N STA N T N A M E EN U VA L UE

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)
12/15/2022 • 2 minutes to read

Gets the current time from the operating system.

Syntax
Time := TIME

Property Value/Return Value


Type: Time
The current time.

Remarks
The time that is returned is different for the Microsoft Dynamics NAV Windows client and Microsoft Dynamics
NAV Web client. For the Windows client, TIME returns the current time of the computer that is running the client,
as determined by the date and time settings of the operating system. For the Web client, the day is determined
by the Regional Setting that is set in the client.
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 C O N ST VA L UE

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)
12/15/2022 • 2 minutes to read

Gets the current date that is used by the client.

Syntax
Date := TODAY

Property Value/Return Value


Type: Date
The current date.

Remarks
The date that is returned is different for the Microsoft Dynamics NAV Windows client and Microsoft Dynamics
NAV Web client. For the Windows client, TODAY returns the current day of the computer that is running the
client, as determined by the date and time settings of the operating system. For the Web client, the day is
determined by the Regional Setting that is set in the client. The very first time you sign-in using the Web client,
the system automatically determines the Regional Setting based on your browser/computer.
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 C O N ST VA L UE

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
12/15/2022 • 2 minutes to read

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 DATAT Y P E

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
12/15/2022 • 2 minutes to read

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 DATAT Y P E

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)
12/15/2022 • 2 minutes to read

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.

VA RIA B L E DATAT Y P E

MyWorkDate Date

NAME C O N ST VA L UE

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
12/15/2022 • 2 minutes to read

This section contains the following topics:


CREATEDATETIME Function (DateTime)
CURRENTDATETIME Function (DateTime)
DT2DATE Function (DateTime)
DT2TIME Function (DateTime)
ROUNDDATETIME Function (DateTime)
Debugger
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

This simple data type denotes decimal numbers ranging from -999,999,999,999,999.99 to
+999,999,999,999,999.99.

Example 1
The following are examples of decimal values.

546.88
3425.57

Example 2
The following is not a decimal, but rather an Integer Data Type.

342

Limits on Decimal Data Type Variables


The Decimal data type is mapped to the Microsoft .NET Framework common language runtime (CLR) Decimal
data type, which controls and the precision and limits for variables.
The following table shows the limits for variables of type Decimal in Dynamics NAV.

L IM IT VA L UE

Maximum format value. +/- 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

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 cannot store values
outside the formatting range since field variables cannot be
This is the maximum value that can be stored in the assigned values outside the formatting range.
database.

Maximum calculating value. +/- 79,228,162,514,264,337,593,543,950,335

This is the maximum value that can be 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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)
CLASS 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)
RELATION 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 3 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

This section contains the following topics:


COPYSTREAM Function
InStream.EOS Function
InStream.READ Function
InStream.READTEXT Function
OutStream
12/15/2022 • 2 minutes to read

This section contains the following topics:


COPYSTREAM Function
OutStream.WRITE Function
OutStream.WRITETEXT Function
Integer Data Type in Dynamics NAV
12/15/2022 • 2 minutes to read

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 1
The following are examples of integer values.

546
-3425

Example 2
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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

This section contains the following topics:


BigInteger Data Type
Decimal Data Type
Integer Data Type
Numeric Functions
OCX Data Type in Dynamics NAV
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 1
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 T Y P E SUBT Y P E

Number Integer Not applicable

PurchHeaderRec Record Purchase Header

Number := PurchHeaderRec."Document Type";

Example 2
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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
ADDLINK Function (RecordRef)
ASCENDING Function (RecordRef)
CAPTION Function (RecordRef)
CHANGECOMPANY Function (RecordRef)
CLOSE Function (RecordRef)
COPYLINKS Function (RecordRef)
COUNT Function (RecordRef)
CURRENTCOMPANY Function (RecordRef)
CURRENTKEY Function (RecordRef)
CURRENTKEYINDEX Function (RecordRef)
DELETE Function (RecordRef)
DELETEALL Function (RecordRef)
DELETELINK Function (RecordRef)
DELETELINKS Function (RecordRef)
DUPLICATE Function (RecordRef)
FIELD Function (RecordRef)
FIELDCOUNT Function (RecordRef)
FIELDEXIST Function (RecordRef)
FIELDINDEX Function (RecordRef)
FILTERGROUP Function (RecordRef)
FIND Function (RecordRef)
FINDFIRST Function (RecordRef)
FINDLAST Function (RecordRef)
FINDSET Function (RecordRef)
GET Function (RecordRef)
GETFILTERS Function (RecordRef)
GETPOSITION Function (RecordRef)
GETTABLE Function (RecordRef)
GETVIEW Function (RecordRef)
HASFILTER Function (RecordRef)
HASLINKS Function (RecordRef)
INIT Function (RecordRef)
INSERT Function (RecordRef)
ISEMPTY Function (RecordRef)
ISTEMPORARY Function (RecordRef)
KEYCOUNT Function (RecordRef)
KEYINDEX Function (RecordRef)
LOCKTABLE Function (RecordRef)
MODIFY Function (RecordRef)
NAME Function (RecordRef)
NEXT Function (RecordRef)
NUMBER Function (RecordRef)
OPEN Function (RecordRef)
RENAME Function (RecordRef)
RECORDID Function (RecordRef)
READPERMISSION Function (RecordRef)
RESET Function (RecordRef)
SETPOSITION Function (RecordRef)
SETVIEW Function (RecordRef)
SETTABLE Function (RecordRef)
SETRECFILTER Function (RecordRef)
WRITEPERMISSION Function (RecordRef)
Report Data Type in Dynamics NAV
12/15/2022 • 2 minutes to read

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)
DEFAULTLAYOUT Function
EXECUTE Function
PREVIEW Function (Report)
PRINT Function
PRINTONLYIFDETAIL Function (Report)
QUIT Function (Report, XMLport)
RDLCLAYOUT 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)
WORDLAYOUT Function
WORDXMLPART Function
Sessions
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Entr y table is copied from the primary key field No. in the Sales
Header or Purchase Heade r 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 should use test pages only within test codeunits.

See Also
TestRequestPage Data Type
TestRequestPage Data Type in Dynamics NAV
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

VA RIA B L E DATA T Y P E

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)
ISDATEFORMULA 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
Title Property (this property has been deprecate and is no longer used)
ToolTip Property
ToolTipML Property
ValuesAllowed Property
Visible Property
Width Property

Part Control Properties


The following properties apply to Par t 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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 Repor t Labels of a report object.
Caption Property
CaptionML Property
Description Property
ID Property
Name Property

See Also
Properties
Table Properties in Microsoft Dynamics NAV
12/15/2022 • 7 minutes to read

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
12/15/2022 • 2 minutes to read

This topic lists properties of the XMLport object, element, and attribute.

XMLport Object Properties


The following properties apply to the XMLpor t 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
12/15/2022 • 2 minutes to read

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 Proper ties 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.
Proper ties window:
SourceTable
Customer
Customer
VariableName
<Customer> default
Cust.
XMLpor t Designer :
DataSource field
<Customer> (Customer)
Cust. <Customer>

See Also
SourceTable Property
SourceType Property
Key Properties
12/15/2022 • 2 minutes to read

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.

P RO P ERT Y N A M E 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
12/15/2022 • 2 minutes to read

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:

C OMMAND TA SK

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
12/15/2022 • 2 minutes to read

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.
Installing AL with Microsoft Dynamics NAV
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
from SQL Server. Dynamics 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
12/15/2022 • 3 minutes to read

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 Histor y 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 Histor y pane, you can copy the command and paste it into
the Microsoft Dynamics NAV Administration Shell, for example.
Microsoft Dynamics NAV Windows PowerShell
Cmdlets
12/15/2022 • 3 minutes to read

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 Ser vice 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 Star t , 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 Star t , 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-NAVSer verInstance 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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 4 minutes to read

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 C L A SSIF IC AT IO N DESC RIP T IO N EXA M P L E

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,
including administrator contact tenant administrator’s name,
information, such as tenant address, e-mail address, phone
administrator’s name, address, or number)
phone number. Customer’s provisioning
information
DATA C L A SSIF IC AT IO N DESC RIP T IO N EXA M P L E

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 Tenant ID (non-GUID)


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

SystemMetadata Data generated while running the Database table names,


service or program that is not linkable database column names, entity
to a user or tenant. names

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

The following articles describe how to optimize performance in Microsoft Dynamics NAV 2018 when accessing
data from the SQL Server database.
Setting SQL Compatibility Level to Optimize Database Performance
Data Access
Table Keys and Performance
Bulk Inserts
C/AL Database Functions and Performance on SQL Server
Query Objects and Performance
Configuring Query Hints for Optimizing SQL Server Performance
Troubleshooting: Analyzing Long Running SQL Queries Involving FlowFields by Disabling SmartSQL
Troubleshooting: Using Query Store to Monitor Query Performance in Dynamics NAV
Troubleshooting: Using the Event Log to Monitor Long Running SQL Queries in Dynamics NAV

See Also
Configuring Microsoft SQL Server
Microsoft SQL Server documentation
Monitoring Microsoft Dynamics NAV Server
12/15/2022 • 2 minutes to read

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
12/15/2022 • 6 minutes to read

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.

C O UN T ER DESC RIP T IO N

# 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.

C O UN T ER DESC RIP T IO N

# 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.
C O UN T ER DESC RIP T IO N

# 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.Ser vice 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.
C O UN T ER DESC RIP T IO N

# 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.

C O UN T ER DESC RIP T IO N

# 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.
C O UN T ER DESC RIP T IO N

# 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
12/15/2022 • 2 minutes to read

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
TA SK F O R M O RE IN F O RM AT IO N , 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
the event trace monitoring tool to start an event trace Data
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
12/15/2022 • 8 minutes to read

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-Ser ver and Microsoft-DynamicsNAV-Common . The Microsoft-DynamicsNAV-
Common provider is strictly for telemetry trace events. All other events use Microsoft-DynamicsNAV-
Ser ver . 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.

EVEN T T RA C E P RO VIDER K EY W O RD DEC IM A L VA L UE H EXA DEC IM A L VA L UE

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.

EVEN T T RA C E P RO VIDER K EY W O RD DEC IM A L VA L UE H EXA DEC IM A L VA L UE

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 EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED

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 EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED

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.

EVEN T T RA C E P RO VIDER K EY W O RD DEC IM A L VA L UE H EXA DEC IM A L VA L UE

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 EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED

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 EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED

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.

EVEN T T RA C E P RO VIDER K EY W O RD DEC IM A L VA L UE H EXA DEC IM A L VA L UE

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 EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED

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.

Impor tant: 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.

EVEN T T RA C E P RO VIDER K EY W O RD DEC IM A L VA L UE H EXA DEC IM A L VA L UE

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 C L A SSIF IC AT IO N VERB O SIT Y 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.

A RGUM EN T DESC RIP T IO N T RA C E EVEN T T Y P E

category Specifies the category of the telemetry Telemetry (TelemetryData)


trace event.

connectionType Specifies the RoleTailored client that Service calls (ServiceCall)


has 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 C/AL function trace events (ALTracing)
type 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.
A RGUM EN T DESC RIP T IO N T RA C E EVEN T T Y P E

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
12/15/2022 • 11 minutes to read

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.

EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

214 Information 8 Operational Message:


'Microsoft Dynamics
NAV Service' is
listening to requests
at net.tcp://[Server]:
[Port]/[ServerInstance
]/ManagementServic
e.

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
]/ManagementServic
e 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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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
'ClientServicesCertific
ateThumbprint' 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
ClientServicesCertifica
teThumbprint
parameter in the
CustomSetting.xml
file for the Microsoft
Dynamics NAV
Server.
EVEN T ID L EVEL TA SK C AT EGO RY C H A N N EL M ESSA GE/ REM A RK S

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
'ClientServicesCertific
ateThumbprint' 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
ClientServicesCertifica
teThumbprint
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.

TA SK C AT EGO RY DESC RIP T IO N

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
12/15/2022 • 5 minutes to read

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 Ser vices Logs > Microsoft > DynamicsNAV .
Server folder
The Ser ver folder contains events from the event trace provider called Microsoft-DynamicsNAV-Ser ver . The
events are recorded in the following logs:

LO G DESC RIP T IO N

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.
LO G DESC RIP T IO N

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:

LO G DESC RIP T IO N

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 > Ser ver 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 Ser vices 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 Ser vices Logs > Microsoft
> DynamicsNAV > Ser ver .
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
12/15/2022 • 3 minutes to read

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 Star t , 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-Ser ver , 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 Proper ties list, select Keywords (Any) , and then choose the Edit button.
b. On the Proper ty 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 director y 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 Proper ties .
3. In the Proper ties dialog box, choose the Trace Buffers tab.
4. Set the following properties.

P RO P ERT Y REC O M M EN DED M IN IM UM VA L UES

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 Proper ties dialog box.

To start and stop a Data Collector Set


To start to collect data, right-click the Data Collector Set, and then choose Star t .
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
12/15/2022 • 2 minutes to read

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 https://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 inter val 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 options area 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-Ser ver .
If you want to filter on a specific trace event, include a colon after Microsoft-DynamicsNav-
Ser ver , 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-
Ser ver :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-Ser ver :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 Star t 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
12/15/2022 • 2 minutes to read

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-Ser ver and Microsoft-DynamicsNAV-Common . Microsoft-DynamicsNAV-
Ser ver 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
12/15/2022 • 3 minutes to read

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 Ser vices 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 C OMMAND

Events in the all DynamicsNAV > Ser ver logs Get-WinEvent -ProviderName Microsoft-
DynamicsNav-Server

Events in the all DynamicsNAV > Common logs Get-WinEvent -ProviderName Microsoft-
DynamicsNav-Common

Events in the DynamicsNAV > Ser ver > 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 C OMMAND

Events in the Microsoft Dynamics NAV Server Get-WinEvent -LogName Microsoft-DynamicsNav-


Operational log Server/Operational

Trace events in the Microsoft Dynamics NAV Server Get-WinEvent -LogName Microsoft-DynamicsNav-
Debug log Server/Debug -Oldest

To enable the Dynamics NAV Debug Logs from Windows PowerShell


There are two debug logs for Dynamics NAV: Microsoft-DynamicsNav-Ser ver/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
12/15/2022 • 2 minutes to read

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 Ser vices 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 Star t , 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 Restar t .
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
12/15/2022 • 2 minutes to read

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
Troubleshooting: Using the Event Log to Monitor Long Running SQL Queries in Dynamics NAV
Troubleshooting: Analyzing Long Running SQL Queries Involving FlowFields by Disabling SmartSQL
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
12/15/2022 • 8 minutes to read

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.

SET T IN G DESC RIP T IO N REM A RK S

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.
SET T IN G DESC RIP T IO N REM A RK S

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
Microsoft Dynamics NAV Web client to Inactive.
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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 5 minutes to read

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 Expor t-NAVData and
Impor t-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.
T Y P E O F DATA DESC RIP T IO N

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 Impor t-
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 DESC RIP T IO N

Expor t-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.

Impor t-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 DESC RIP T IO N

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.

A C C ESS DESC RIP T IO N

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
12/15/2022 • 2 minutes to read

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:

O F F IC E P RO DUC T F EAT URE IN F O RM AT IO N

Excel and Word Users can send Dynamics NAV data on The basic requirement for this feature
pages to Excel, Word, or in an email. is 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
Dynamics NAV to Excel, they can the Microsoft Office Excel Add-In on
refresh Excel to get the latest data the client by using the Dynamics NAV
from Dynamics NAV. If they made Setup. For more information, see:
changes to the data in Excel, then Client Option in Setup
these changes 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 Microsoft 365 and
documents to Excel, Word, or other SharePoint Online
Microsoft Office products, the data can
be stored on SharePoint Online and
accessed using Microsoft 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 Microsoft Office Outlook Add-In
to-dos, contacts, and tasks, between
Dynamics NAV and Outlook.
O F F IC E P RO DUC T F EAT URE IN F O RM AT IO N

Users can complete Dynamics NAV Setting Up the Office Add-Ins for
business tasks from their Outlook Outlook Inbox Integration
inbox. 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
12/15/2022 • 8 minutes to read

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 Microsoft 365 Authentication FastTab in the User Card window. The authentication email address
must be the same account that the users log on to Microsoft 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.
Upcoming releases of some browsers, such as Google Chrome 80 and Microsoft Edge, will include
changes to how cookies are handled. To ensure that the SharePoint app works with these browser
versions, make sure that the Dynamics NAV platform has been upgraded to a recommended update
version as described in Preparing Dynamics NAV or Dynamics 365 Business Central for Upcoming
Changes to Browser Cookie Policy.

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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)
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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
12/15/2022 • 2 minutes to read

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.

B USIN ESS A REA S F UN C T IO N A L A REA S

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


B USIN ESS A REA S F UN C T IO N A L A REA S

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
12/15/2022 • 2 minutes to read

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.

SC EN A RIO P RO C EDURES

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
Microsoft Dynamics NAV 2009 R2 For more information, see Upgrading to Microsoft
Microsoft Dynamics NAV 5.0 Dynamics NAV 2013 in the MSDN Library.
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.
SC EN A RIO P RO C EDURES

Technical upgrade of Microsoft Dynamics NAV 2018 Converting a Database


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
12/15/2022 • 3 minutes to read

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$dbproper ty 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/15/2022 • 7 minutes to read

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.

N EW F IEL D
TA B L E ID TA B L E N A M E O L D F IEL D ID N EW F IEL D ID O L D F IEL D N A M E 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
N EW F IEL D
TA B L E ID TA B L E N A M E O L D F IEL D ID N EW F IEL D ID O L D F IEL D N A M E 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 13601 13652 Payment Type PaymentTypeVali


Method 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.
Iceland
The following fields are mareded as ObsoleteState:Pending in the IS version.

TA B L E ID F IEL D ID C O M M EN T S

21 10900 Will be removed in a later release.

311 10900 Will be removed in a later release.

United Kingdom
The following fields are marked as ObsoleteState:Pending in the UK version.

TA B L E ID F IEL D ID C O M M EN T S

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.


TA B L E ID F IEL D ID C O M M EN T S

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.

TA B L E ID F IEL D ID C O M M EN T S

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.


TA B L E ID F IEL D ID C O M M EN T S

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.

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.


TA B L E ID F IEL D ID C O M M EN T S

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.

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.


TA B L E ID F IEL D ID C O M M EN T S

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.

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.

TA B L E ID F IEL D ID C O M M EN T S

5723 All Deprecated. Do not use.

27 5704 Will be removed in a later release.

32 5707 Will be removed in a later release.


TA B L E ID F IEL D ID C O M M EN T S

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.

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

Business Activity Statements using ECI


A business activity statement (BAS) is a form that businesses must submit to the Australian Tax Office (ATO) on a
monthly or quarterly basis. BAS reports both the total Goods and Services Tax (GST) collected from sales
activities, which must be paid to the ATO, and the total GST paid on purchases, which is claimed as an input tax
credit. For more information, see Business Activity Statements.
Companies can report their taxes manually using a form or electronically using Electronic Commerce Interface
(ECI) software provided by the ATO.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Replaced Electronic Commerce Interface (ECI) software is no longer


being supported by the Australian Tax Office (ATO).
Preparation of BAS using a template from ECI and export to
an XML file for ECI software is no longer supported. You can
use the GST Return report in the standard version to
prepare information required to submit BAS to ATO. For
more information, see Report GST to the Tax Authorities.

GST Sales and GST Purchase Reports


You can use the GST sales report and GST purchase report to reconcile the sales and purchase amounts
recorded in business activity statements (BAS).

M O VED, REM O VED, O R REP L A C ED? WH Y?

Replaced To make the reports easier to use we have converted them


to pages. For example, this means that you can filter by date,
and export the data to Excel.

Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring
the simulation entries into real accounting entries.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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 Belgian Version of
Dynamics NAV
12/15/2022 • 2 minutes to read

This topic lists and describes the local functionality for Belgium 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.

Standard Sales and Purchase Lines Setup


You can specify in the Sales & Receivables and Purchases & Payables windows how the standard sales or
purchase codes will be entered when you create different sales or purchase documents.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Moved The feature to set up standard sales or purchase lines is no


longer specific to Belgium, 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
Belgium Local Functionality in Dynamics NAV
Deprecated Features in the Dutch Version of
Dynamics NAV
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

Standard Sales and Purchase Lines Setup


You can specify in the Sales & Receivables and Purchases & Payables windows how the standard sales or
purchase codes will be entered when you create different sales or purchase documents.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Moved The feature to set up standard sales or purchase lines 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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Replaced The Simulation Entries feature has been replaced with the
Posting Preview feature in the standard product.

Objects or Fields Deleted in Microsoft Dynamics NAV 2018


The following list shows fields that are deleted as a result of removed features.

TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

263 Intrastat Jnl. Line 10500 Shipment Method

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

GST Sales and GST Purchase Reports


You can use the GST sales report and GST purchase report to reconcile the sales and purchase amounts
recorded in business activity statements (BAS).

M O VED, REM O VED, O R REP L A C ED? WH Y?

Replaced To make the reports easier to use we have converted them


to pages. For example, this means that you can filter by date,
and export the data to Excel.

Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring
the simulation entries into real accounting entries.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Moved The Multiple Interest Rates feature is no longer specific to


Norway, so we have made it generally available in the
standard product.

Paper Sources and Tray Numbers


When printing Norwegian sales documents, you can set up different tray numbers and paper sources on the
first, last, and other pages.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Removed The feature is not used.

Objects or Fields Deleted in Microsoft Dynamics NAV 2018


The following fields have been deleted as a result of features that have been removed.

TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

81 Gen. Journal Line 10606 Source Curr. Inv.tax Amount

81 Gen. Journal Line 10607 Source Curr. Inv.tax Base

15000004 Waiting Journal 10606 Source Curr. Inv.tax Amount

15000004 Waiting Journal 10607 Source Curr. Inv.tax Base

49 Invoice Post. Buffer 10604 VAT Code

254 VAT Entry 10603 Add.-Curr. Inv.tax Amount

254 VAT Entry 10604 Add.-Curr. Inv.tax Base

78 Printer Selection 10600 First Page - Paper Source


TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

78 Printer Selection 10601 First Page - Tray Number

78 Printer Selection 10602 Other Pages - Paper Source

78 Printer Selection 10603 Other Pages - Tray Number

78 Printer Selection 10604 Giro Page - Paper Source

78 Printer Selection 10605 Giro Page - Tray Number

311 Sales & Receivables Setup 10600 Print Receipt on Giro

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
12/15/2022 • 2 minutes to read

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

Objects or Fields Deleted in Microsoft Dynamics NAV 2018


The following list shows fields that are deleted as a result of removed features.

TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

263 Intrastat Jnl. Line 10500 Shipment Method

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
12/15/2022 • 2 minutes to read

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.

Inward Registration
You can use an inward registration to post a preliminary purchase invoice, which you overwrite later when you
post the invoice normally.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Removed The Inward Registration feature is no longer relevant and has


been removed.

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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
12/15/2022 • 2 minutes to read

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.

Block Items from Sales and Purchasing


You can block an item from being entered on sales or purchase lines, and you can block it from being posted in
any transaction.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Moved The Block Items from Sales and Purchasing feature is no


longer specific to Switzerland, so we have made them
generally available in the standard product.

Deactivate Item Cost Tracking


When inventory is not tracked for an item, the item cost does not need to be tracked, and an item ledger entry
does not need to be created. For such items, you can select the No Stokkeeping check box to deactivate cost
tracking.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Removed Deactivate Item Cost Tracking has been removed from the
Swiss version because similar functionality is available in the
standard version with the Non-Inventor y item type.

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

Objects or Fields Deleted in Microsoft Dynamics NAV 2018


The following fields have been deleted as a result of features that have been removed.
TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

27 Item 11503 Sale blocked

27 Item 11504 Purchase blocked

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
12/15/2022 • 3 minutes to read

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.

Localize Intrastat Reporting


You must report shipment method during Intrastat reporting to be legally compliant. The code for the shipment
method must be transferred from the Intrastat journal.

M O VED, REM O VED, O R REP L A C ED? WH Y?

Replaced The Localize Intrastat Reporting feature has been replaced


with the Shipment Method Mandator y field in the
Intrastat Setup window in the standard product.

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.
M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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 Entr y - Displays the daily total for VAT entries for a specific period.
Day Book Cust. Ledger Entr y - Displays the daily total for customer ledger entries for a specific period.
Day Book Vendor Ledger Entr y - Displays the daily total for vendor ledger entries for a specific period.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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.

M O VED, REM O VED, O R REP L A C ED? WH Y?

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 or Fields Deleted in Microsoft Dynamics NAV 2018
The following list shows fields that are deleted as a result of removed features.

TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E

23 Vendor 10550 BACS Account No.

81 Gen. Journal Line 10550 BACS Account No.

81 Gen. Journal Line 10551 BACS Exported

81 Gen. Journal Line 10552 BACS Entry No.

81 Gen. Journal Line 10553 Recurring Calendar Source

263 Intrastat Jnl. Line 10500 Shipment Method

271 Bank Account Ledger Entry 10550 BACS Ledger Entries

312 Purchases & Payables Setup 10550 BACS File Name

312 Purchases & Payables Setup 10551 Import BACS Files

334 Column Layout 10505 Keep Comparison Period


Scope

363 Analysis View 10550 Calendar Source

7118 Analysis Column 10505 Keep Comparison Period


Scope

7152 Item Analysis View 10550 Calendar Source

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
12/15/2022 • 8 minutes to read

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.

Prepare Microsoft Dynamics 365 for Sales integration code for


upgrade
If your solution integrates with Microsoft Dynamics 365 for Sales, and you're upgrading to Dynamics NAV
cumulative update 41 (Build 47056) or later, you'll have modify some code before you upgrade. For more
information, see Modifying Dynamics 365 Sales Code for Technical Upgrade to Dynamics NAV 2018.

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. Uninstall all extensions from the tenant.
You can do this from Extension Management page in the Dynamics NAV client or by using the
Uninstall-NAVApp cmdlet of the Microsoft Dynamics NAV Administration Shell.
To get a list of the extensions that are installed, run this command:
Get-NAVAppInfo -ServerInstance <ServerInstanceName> -Tenant <TenantID>

For each extension, run this command to uninstall it:

Uninstall-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

Alternately, to remove them all at once, you can run this command:

Get-NAVAppInfo -ServerInstance <ServerInstanceName> -Tenant default | % { Uninstall-NAVApp -


ServerInstance <ServerInstanceName> -Name $_.Name -Version $_.Version }

For more information, see Install or Uninstall Extensions.


3. 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.
4. 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.
5. On the Tools menu, choose Build Ser ver Application Objects , and then choose the Yes button.
6. If any errors occur, they are shown in the Error List window. Make sure that you address all compilation
errors before you continue.
7. 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.

8. 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.
9. 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

10. Clear all records from the dbo.Ser ver Instance and dbo.Debugger Breakpoint tables in the old
database in SQL Server.
Using SQL Server Management Studio, open and clear the dbo.Ser ver 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]

11. (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.
If you do not run the development environment as an administrator, you will get an error and the
conversion will be stopped.
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
12/15/2022 • 11 minutes to read

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:

VERSIO N DESC RIP T IO N

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:

VERSIO N TO O L / C O M P O N EN T

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 Expor t-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 Impor t-
NAVApplicationObject function. The Join-NAVApplicationObjectFile cmdlet combines
multiple application object text files into one text file. The Impor t-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
12/15/2022 • 17 minutes to read

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:
VERSIO N FOB REM A RK S

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.Ser ver 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.Ser ver 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, run the Microsoft Dynamics NAV
2018 development environment as an administrator, open the old database, and follow the conversion
instructions.
If you do not run the development environment as an administrator, you will get an error and the conversion
will be stopped.

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 Impor t 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.

4. (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 Star t and follow the instructions.
If you do not run the development environment as an administrator, you will get an error and the data upgrade
will be stopped.
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 ser ver star tup
(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 P UB L ISH ER VERSIO N

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 2017
12/15/2022 • 5 minutes to read

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

You might also like