CAL Prog
CAL Prog
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
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
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
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.
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.
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.
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.
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.
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
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.
IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S
* 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
Editing in Excel using the Excel Add-in Excel 2019 or Excel 2016.
Printing reports to Excel or Word Microsoft Office 2019, Microsoft Office 2016,
Microsoft Office 2013 SP1, or Microsoft Microsoft
365.
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
IT EM REQ UIREM EN T S
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
* 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
IT EM REQ UIREM EN T S
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.
IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S
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.
IT EM REQ UIREM EN T S
IT EM REQ UIREM EN T S
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.
IT EM REQ UIREM EN T S
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.
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.
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.
Pages Yes: Create, Read, Update, and Delete Yes: Create, Read, Update, and Delete
operations (CRUD) operations (CRUD)
Codeunits Yes No
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.
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.
https://localhost:7048/DynamicsNAV/OData/Company('CRONUS-International-Ltd.')/Customer?Tenant=Tenant1
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.
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.
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.
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.
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.
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.
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.
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.
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]
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.
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.
NAME VA L UE REP L A C E
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.
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.
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.
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
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.
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.
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.
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
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
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.
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 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 the differences in how numeric values are sorted. Sorting Numeric Values
TO SEE
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 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 emit, collect, and view custom telemetry Instrumenting an Application for Telemetry
for your an application.
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.
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.
NOTE
If the C/AL code is in a local function, then you cannot run it from another object.
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.
Learn about how to define the data model on which you Tables
build your application.
Read about how you create pages and work in Page Pages
Designer.
Writing Code
TO SEE
Read more about C/AL, the programming language that you Programming in C/AL
use in Dynamics NAV.
Understand what XMLports are used for and how to create XMLports
them.
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
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.
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
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.
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 how to use the C/AL Editor. Creating and Modifying Codeunits
Follow step-by-step procedures that show how to use Walkthrough: Using Codeunits
codeunits.
Developing Codeunits
TO SEE
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.
TO SEE
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 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
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
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.
TYPE SUBT Y P E
Container ContentArea
FactBoxArea
RoleCenterArea
Group Group
Repeater
CueGroup
FixedLayout
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.
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.
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.
NOTE
RoleCenter page types are not associated with a table.
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.
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 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.
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.
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.
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
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 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
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 triggers available for XMLports and XMLport XMLport Triggers
elements.
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.
MenuSuite Topics
The following table lists topics that provide information about MenuSuites.
TO SEE
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.
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.
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
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
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.
F UN C T IO N DESC RIP T IO N
The SEND function call should be the last statement in the notification code, after any ADDACTION or
SETDATA function calls for the notification instance.
NOTE
GlobalScope is currently not supported. This will be implemented in a future release.
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:
CreditBalanceNotification Notification
OpenCustomer Text
T EXT C O N STA N T N A M E C O N ST VA L UE
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:
CustNumber Text
CustNo Text
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.
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).
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.
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.
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.
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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
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.
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
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.
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.
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.
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.
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.
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)
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:
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
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.
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
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
See Also
C/AL Functions
C/SIDE Reference Guide
Development
Dates and Times
12/15/2022 • 2 minutes to read
Undefined Dates
An undefined or blank date is specified by 0D. The undefined date is considered to be before all other dates.
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.
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.
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.
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).
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
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.
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>
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
T EXT C O N STA N T EN U VA L UE
See Also
Date and Time Functions
Developing Multilanguage-Enabled Applications
CLOSINGDATE Function (Date)
12/15/2022 • 2 minutes to read
Syntax
ClosingDate := CLOSINGDATE(Date)
Parameters
Date
Type: Date
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
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
// 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);
See Also
Date and Time Functions
DATE2DMY Function (Date)
12/15/2022 • 2 minutes to read
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.
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
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.
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
InputDate := 010114D;
DayOfWeek := DATE2DWY(InputDate, 1);
WeekNumber := DATE2DWY(InputDate, 2);
Year := DATE2DWY(InputDate, 3);
MESSAGE(Text000 + Text001 + Text002 + Text003, InputDate, DayOfWeek, WeekNumber, Year);
See Also
Date and Time Functions
DATI2VARIANT Function
12/15/2022 • 2 minutes to read
Syntax
Variant := DATI2VARIANT(Date, Time)
Parameters
Date
Type: Date
The input date.
Time
Type: Time
The input time.
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
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.
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
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.
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
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
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
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).
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
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
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
Syntax
Time := 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
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
Syntax
Date := TODAY
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
MESSAGE(Text000, TODAY);
See Also
Date and Time Functions
VARIANT2DATE Function
12/15/2022 • 2 minutes to read
Syntax
Date := VARIANT2DATE(Variant)
Parameters
Variant
Type: Variant
The input variant.
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
Syntax
Time := VARIANT2TIME(Variant)
Parameters
Variant
Type: Variant
The input variant.
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.
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
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
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
L IM IT VA L UE
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.
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;
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
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 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
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
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
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
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.
Example 2
This example shows how you can use the value of an option field as a constant in your C/AL code.
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
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
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
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
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
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.
VA RIA B L E DATA T Y P E
varAutomation Automation
varVariant Variant
varDateTime DateTime
varDateTime := CURRENTDATETIME;
varVariant := varDateTime;
varAutomation.MethodDateData(varVariant);
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.
Menu Properties
The following properties apply to menus on a MenuSuite object.
Bitmap Property
Caption Property
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.
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
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
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.
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.
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.
SumIndexFields Property Determines the fields for which the system will maintain a
SumIndex.
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
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
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.
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.
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.
Get-Command *NAV*
To get Help about syntax and options for a specific cmdlet, type the following cmdlet.
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.
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.
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.
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.
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
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.
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.
C O UN T ER DESC RIP T IO N
Average server operation time (ms) Average duration of server operations in milliseconds.
C O UN T ER DESC RIP T IO N
# Open connections The current number of open connections from the Microsoft
Dynamics NAV Server instance to Dynamics NAV databases
on SQL Servers.
# 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.
# Open tenant connections Current number of open tenant connections from the
Microsoft Dynamics NAV Server instance to Dynamics NAV
tenant databases on SQL Servers.
% Query repositioning rate Percentage of queries that are re-executed when fetching
the query result.
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."
# 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.
# 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.
# Rows in all temporary tables Count of number of rows in all temporary tables.
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.
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.
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.
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
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.
For a list and description of EventViewer trace events, see Microsoft Dynamics NAV Server Admin and
Operational Events.
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
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
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.
ID EVEN T ( TA SK / O P C O DE) W H AT IS T RA C ED
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):
Error 701
Informational 702
Informational 703
Verbose 704
Warning 705
Informational 706
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.
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.
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.
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.
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.
- 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.
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.
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.
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
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.
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
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.
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
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.
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
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
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
Remarks:
Refers to NAS service
only. Indicates that
the NAS service is
scheduled to start.
Remarks:
Refers to NAS service
only. Indicates that
the NAS service has
started successfully.
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
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
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.
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
Remarks:
Refers to Microsoft
Dynamics NAV
Server instances that
are used in a
multitenant
environment.
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
Remarks:
Refers to Microsoft
Dynamics NAV
Server instances that
are configured for
multitenancy.
Remarks:
Refers to the
Microsoft Dynamics
NAV Server instances
that are configured
for multitenancy.
Typically, this
condition occurs
when the Microsoft
Dynamics NAV
Server instance starts
or when the Mount-
NAVTenantcmdlet is
run.
Remarks:
Refers to Microsoft
Dynamics NAV
Server instances that
are configured for
multitenancy.
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.
Remarks:
This event occurs
when a user
successfully logs on
to the Microsoft
Dynamics NAV
Server instance from
a RoleTailored client.
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.
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.
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.
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
Remarks:
Occurs when the
security certificate
that is used by the
Microsoft Dynamics
NAV Server is not
valid for use on the
current 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.
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.
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.
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.
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
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.
<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']]
<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>
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.
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.
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.
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.
2. At the command prompt, run one of the following commands to create a trace data collector.
For telemetry trace events:
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:
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.
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
Trace events in the Microsoft Dynamics NAV Server Get-WinEvent -LogName Microsoft-DynamicsNav-
Debug log Server/Debug -Oldest
TIP
You can also enable the Debug log from Event Viewer. For more information, see Enable Analytic and Debug Logs.
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
Write-Host "List of AL functions that took more than $maxAllowedSeconds seconds to execute :" -
ForegroundColor DarkYellow
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.
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.
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.
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.
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.
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.
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.
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
Application data Exports the data that defines the application in the database.
This includes the permissions, permission sets, profiles, and
style sheets.
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.
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.
Get-NAVDataFile Gets information from a file that has been exported from a
Dynamics NAV database.
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.
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.
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.
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:
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:
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.
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.
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.
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.
Activate your Dynamics NAV license. How to: Upload the License File
Assign users to permission sets. How to: Define Permissions for 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.
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.
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.
Fixed Assets
General Ledger
Inventory
Payables
Receivables
History
Marketing
Order Processing
History
Order Processing
Planning
History
Inventory
Manufacturing Capacities
Costing
Execution
History
Planning
Product Design
Jobs History
Jobs
Periodic Activities
Reports
Periodic Activities
Reports
Resources
History
Order Processing
Employees
Reports
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
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.
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.
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.
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.
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
TA B L E ID F IEL D ID C O M M EN T S
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
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
TA B L E ID F IEL D ID C O M M EN T S
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.
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.
Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring
the simulation entries into real accounting entries.
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.
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.
NOTE
To use this feature, your purchase invoices or purchase credit memos must have at least one purchase line, and a quantity.
Additionally, when you turn on this feature Dynamics NAV recalculates totals on all purchase invoices and credit memos.
Depending on the number of documents, this can take some time.
Moved The feature to check totals for purchase invoices and credit
memos is no longer specific to the Netherlands, so we have
made it generally available in the standard product.
See Also
Upgrading to Dynamics 365 Business Central
Upgrading the Application Code
Deprecated Fields, and Fields Marked as Obsolete
Netherlands Local Functionality in Dynamics NAV
Deprecated Features in the Finnish Version of
Microsoft Dynamics NAV 2018
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.
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.
Replaced The Simulation Entries feature has been replaced with the
Posting Preview feature in the standard product.
TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E
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.
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.
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.
Simulation Entries
The Simulation Registers window contains posted simulation entries that you can verify before transferring
the simulation entries into real accounting entries.
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.
TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E
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.
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.
TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E
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.
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.
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.
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.
Moved The Unposted Sales and Unposted Purchase reports are now
available from the Navigation Pane as views under Sales
Orders and Purchase Orders.
Removed Lack of use. The business need that this functionality was
introduced to cover is no longer relevant.
TA B L E ID TA B L E N A M E F IEL D ID F IEL D N A M E
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)
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.
Alternately, to remove them all at once, you can run this command:
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:
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:
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.
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.
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:
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.
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.
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.
VERSIO N TO O L / C O M P O N EN T
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:
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:
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.
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.
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.
Then, you can run this command to import the text file:
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.
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 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).
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:
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 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.
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.
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.
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.
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:
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.
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:
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:
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:
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:
d. For each V1 Extension that you want to upgrade to a V2 Extension, run these commands:
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
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.
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.
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