Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Building ERP Solutions with Microsoft Dynamics NAV
Building ERP Solutions with Microsoft Dynamics NAV

Building ERP Solutions with Microsoft Dynamics NAV: Solve business scenarios using NAV

Arrow left icon
Profile Icon Stefano Demiliani
Arrow right icon
zł246.99
Paperback Mar 2017 392 pages 1st Edition
eBook
zł39.99 zł196.99
Paperback
zł246.99
Subscription
Free Trial
Arrow left icon
Profile Icon Stefano Demiliani
Arrow right icon
zł246.99
Paperback Mar 2017 392 pages 1st Edition
eBook
zł39.99 zł196.99
Paperback
zł246.99
Subscription
Free Trial
eBook
zł39.99 zł196.99
Paperback
zł246.99
Subscription
Free Trial

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Building ERP Solutions with Microsoft Dynamics NAV

Chapter 1.  Introduction to Microsoft Dynamics NAV Architectures

Microsoft Dynamics NAV is an Enterprise resource planning (ERP) software and it is part of the Microsoft Dynamics product's family.

In this chapter, we will cover the following topics:

  • Microsoft Dynamics NAV and its functional areas 
  • History of Microsoft Dynamics NAV 
  • An overview of Microsoft Dynamics NAV architectures and components
  • NAV deployment's solutions and the differences between them

Introducing Microsoft Dynamics NAV

Microsoft Dynamics NAV delivers integrated functionality to provide support for the following aspects:

  • Financial management
  • Supply chain management
  • Manufacturing
  • Distribution
  • Customer relationship management
  • Sales and marketing
  • Service management
  • Human resource management
  • Project and resource management
  • Warehouse management

Microsoft Dynamics NAV is considered to be one of the most versatile and agile ERPs on the market. It's very quick and affordable to customize and it has the power to be able to grow with your business needs.

With NAV you can customize every aspect of the application (from fields to business logic) and you can build new modules from scratch. You have complete access to the source code of the application and you have an integrated environment that helps you to make customizations and implementations.

Microsoft Dynamics NAV history

Microsoft Dynamics NAV was born from Navision, a suite of accounting applications which Microsoft acquired in 2002.

Navision was created at Personal Computing and Consulting (PC&C A/S), a company founded in Denmark in 1983 by three college students. This company released its first accounting package, PC Plus, in 1984 (a single-user character-based application) and then in 1987 they released the first version of Navision, a character-based client/server accounting application that works over a LAN and with more simultaneous users:

Microsoft Dynamics NAV history

In 1990, Navision 3.0 was launched. This version introduced AL, an internal application language similar to the actual Client/server Application Language (C/AL). This was a killer feature: the new application language made it possible to customize every part of the application and this was unique on the market at that time.

The product grew and in 1995 Navision Financials 1.0 was launched based on the Microsoft Windows 32-bit client/server platform:

Microsoft Dynamics NAV history

The product was improved in the following years by adding more features as follows:

  • Integration of e-commerce applications such as Commerce Gateway, Commerce Portal
  • User portal, browser-based access
  • Supply chain collaboration functionality including manufacturing and distribution
  • Extended financial management functionality
  • Extended and new functionality within customer relationship management
  • Multicurrency
  • Multilanguage

On July 11, 2002, Navision was acquired by Microsoft and Microsoft created the Microsoft Business Solutions division. In September, 2005 Microsoft re-branded the product as Microsoft Dynamics NAV.

In November 2008, Microsoft announced Microsoft Dynamics NAV 2009, with a totally new architecture, as follows:

  • A new client called the RoleTailored Client
  • An old client (renamed as the Classic Client)
  • New objects called Pages for the RoleTailored Client
  • A new report architecture (RDLC with Visual Studio)
  • The possibility to have a three-tier architecture (with the RoleTailored Client) and the old client/server architecture (with the Classic Client):

Microsoft Dynamics NAV history

Microsoft Dynamics NAV has had continuous improvements over the years on every aspect of its technical and functional side.

Microsoft Dynamics NAV 2013 introduced the following new features:

  • A totally new Web client with rich experience
  • A SharePoint client
  • Internal encoding is now Unicode (no longer ASCII)

The next main release, Microsoft Dynamics NAV 2013 R2, introduced the following new features:

  • Multitenancy (optional): The multitenancy architecture in NAV 2013 R2 consists of a single application database (containing tables common to all databases and objects) and multiple data databases (customer data and login tables). One NAV service tier can serve one application database and multiple tenant databases (and can also sit on different SQL server instances).
  • Provisioning tools: These tools are used for fully automating the deployment of NAV in Azure virtual machines (as IaaS). The provisioning tools include a set of Windows PowerShell cmdlets and scripts that install and configure Microsoft Dynamics NAV components, including Microsoft Dynamics NAV web server components, Microsoft Dynamics NAV Server, and SQL database components.

With Microsoft Dynamics NAV 2015, we saw the introduction of the following topics:

  • RapidStart Services: This is a set of tools and services to automate and speed up the setup and initialization phase of a NAV installation
  • New Tablet client: This is a new client for touch-optimized devices that enables you to access your NAV data regardless of location or what device you are using
  • Web client: The Web client is much improved and faster
  • Office 365 integration: This is simplified e-mail messaging via SMTP including Office 365, signing in to the Windows client using an Office 365 account
  • Document reporting with Microsoft Word: With this release, Microsoft has introduced the possibility to make document reporting by using Word with NAV

With the next release, Microsoft Dynamics NAV 2016, Microsoft introduced the following services:

  • NAV Universal App: By using the Universal Windows Platform, now we have one single app for all devices (it works as a tablet application or as a phone application according to the device you're using).
  • Eventing: Now we have events triggered on code like standard object oriented programming. A publisher raises an event when something happens and a subscriber can listen to this triggered event and make actions.
  • Code editor: We have a new code editor with code completion and IntelliSense.
  • Workflows: Based on eventing, you are now able to create your own business workflows with conditions and responses.
  • Microsoft Dynamics NAV support in Power BI: When you enter your Power BI account, now you have a new service called Microsoft Dynamics NAV that permits you to integrate your data to Power BI.
  • Integration with CRM: Integration with CRM is now native (coded in C/AL), so no more need to use the old CRM External Connector for handling integration tasks.
  • Microsoft Dynamics NAV managed service for partners: A significant new option for Microsoft partners interested in providing multitenant Software as a Service (SaaS) solutions built on Microsoft Dynamics NAV and deployed in the cloud on Microsoft Azure.

The latest release (Microsoft Dynamics NAV 2017) introduced the following new features:

  • Assisted setup
  • Smart notifications
  • Cash flow forecast with Cortana Intelligence
  • Design mode in the Web client
  • Improved integration with Office 365 and a new Outlook add-in
  • Embedded Power BI reports in the NAV RoleTailored Client
  • Improved extensions (new ways to develope customizations)
  • Dynamics 365 for Financials (NAV as SaaS)

Now we have a complete and full-featured enterprise platform that is appreciated all over the world, able to work on-premise and on-cloud, and on many devices as shown in the following screenshot:

Microsoft Dynamics NAV history

Microsoft Dynamics NAV architecture

Before version 2009, Microsoft Dynamics NAV had a two-tier architecture.

In two-tier architectures (client/server data model), the data layers reside on the server and the application logic, presentation logic, and presentation layers reside on the client.

Starting from version 2009, Microsoft Dynamics NAV is composed of three major components (three-tier architecture), as follows:

  • Data tier: A database (database server) where the data are stored. Actually Microsoft Dynamics NAV supports only Microsoft SQL Server as the database server.
  • Middle or service tier: This is an application server. A NAV service that controls all the NAV business logic and operations.
  • Client tier: This represents NAV clients and is the layer that handles the real user interface for the application (presentation logic). NAV can have different types of client as follows:
    • Windows client
    • Web client
    •  Tablet client
    • Phone client

In a production environment, you can obviously have multiple instances of each of the core NAV components:

Microsoft Dynamics NAV architecture

The most common NAV architecture configurations that you can have in a real-world installation are as follows:

  • All three tiers are on the same computer, useful only for a demo or a developer dedicated environment.
  • The RoleTailored client and Microsoft Dynamics NAV Server are on the same computer, the data tier is on a separate computer.
  • The data tier and Microsoft Dynamics NAV Server are on the same computer. The RoleTailored client is on a separate computer (one of the most common scenarios).
  • Each of the three tiers is on a separate computer. This is the suggested configuration for a production environment.

In addition to these three core components, there are other additional components that you can have on a NAV installation:

Component

Purpose

Microsoft Dynamics NAV Help Server

A website with the Help content for Microsoft Dynamics NAV in the languages that your version of Microsoft 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

The components that are needed to enable Microsoft Dynamics NAV Web clients to connect with a browser.

Microsoft Dynamics NAV Server Administration Tool

A tool for configuring and managing the Microsoft Dynamics NAV Server and Microsoft Dynamics NAV sites. It has a GUI that permits an easy way to manage all the server's features.

Development Environment (C/SIDE)

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

Microsoft Office Outlook Add-In and Business Inbox

A set of components for synchronizing data, such as to-dos, contacts, and tasks, between Microsoft Dynamics NAV and Outlook and using Dynamics NAV as your business Inbox in Outlook.

Automated Data Capture System

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

ClickOnce Installer Tools

A set of tools designed to create ClickOnce deployments for applications for the Microsoft Dynamics NAV Windows client.

When using the NAV Web client, all NAV web server components are installed as a website on the Internet Information Server (IIS), so you need to install and properly configure it:

Microsoft Dynamics NAV architecture

You can deploy the web server components on one computer or on separate computers (for example, Microsoft Dynamics NAV web server components installed on a server and Microsoft Dynamics NAV Server and SQL Server installed on another server). When you install Microsoft Dynamics NAV web server components, the setup adds a web server instance (virtual directory and application) on IIS for the Microsoft Dynamics NAV Web client.

Microsoft Dynamics NAV supports four methods for authenticating users who access the Microsoft Dynamics NAV Web client: Windows, UserName, NavUserPassword, and AccessControlService. Windows authentication is configured by default.

When installing the Microsoft Dynamics NAV web server components (or after installation), you can also enable Secure Sockets Layer (SSL) on the connection to the Microsoft Dynamics NAV Web client to increase security.

The following table describes the required components when using the Web client:

Tier

Description

Device

A computer or device that has access to the Internet with a browser.

Web Server

A computer that is running IIS. Microsoft Dynamics NAV web server components are installed on a website on IIS.

Microsoft Dynamics NAV Server (Service Tier)

A Microsoft .NET Framework-based Windows service that manages communications and provides a security layer between clients and Microsoft Dynamics NAV databases in SQL Server.

When activated, the NAV Web client appears as shown in the following screenshot:

Microsoft Dynamics NAV architecture

As previously described, starting from Microsoft Dynamics NAV 2016, we have also native clients for mobile devices. Here is a quick view of the NAV Phone client in the following screenshot:

Microsoft Dynamics NAV architecture

You can now download a native Microsoft Dynamics NAV application from the store of your mobile platform (iOS, Android, Windows):

Microsoft Dynamics NAV architecture

After downloading the app from the store, you can start using Microsoft Dynamics NAV from your mobile device. You can also work with your NAV data directly from Outlook:

Microsoft Dynamics NAV architecture

In Outlook, you can now also create new NAV documents:

Microsoft Dynamics NAV architecture

The new three-tier architecture is multithreaded and it can handle more than one process at a time. Actually, the Microsoft Dynamics NAV server can be installed only on 64-bit operating systems and it requires a 64-bit Microsoft SQL Server version.

Regarding the NAV client, the Windows client can be installed on 32-bit or 64-bit operating systems.

If you install the NAV Windows client on a 64-bit OS, you will have two version of the client installed (32-bit and 64-bit). The default is the 64-bit Windows client, but obviously you can change it.

If you install the NAV Windows client on a 32-bit OS, you will have only the 32-bit client installed.

Microsoft Dynamics NAV also supports deployments where several different companies access a centrally maintained Microsoft Dynamics NAV application. This is called a multitenant architecture.

In a multitenant architecture, information about the Microsoft Dynamics NAV application is stored in a separate application database while data is stored in separate business databases, each of which is a tenant in your deployment.

By separating the application from the 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 and other NAV system tables.

Microsoft Dynamics NAV now includes Windows PowerShell cmdlets that create an application database, and other cmdlets that enable you to create and administer tenant-specific databases. You can find a complete overview of every cmdlets at https://msdn.microsoft.com/en-us/library/jj672916(v=nav.90).aspx.

The Export-NAVApplication cmdlet is the one used to extract application tables in a Microsoft Dynamics NAV database to a separate database. The new application database is created on the same SQL Server instance as the original database.

The following table describes which system tables are moved to the application database when you run this cmdlet and which tables remain in the business data database:

Application database

Business data database

Chart

Access Control

Client Add-in

Active Session

Client Add-in Resources

Company

Debugger Breakpoint

Device

Debugger Watch

Document Service

Object

Integration Page

Object Metadata

Object Metadata Snapshot

Object Tracking

Object Translation

Permission

Page Data Personalization

Permission Set

Printer Selection

Profile

Record Link

Profile Metadata

Report List Translation

Send-To Program

Session Event

Server Instance

User

Style Sheet

User Default Style Sheet

Web Service

User Metadata

User Personalization

User Property

Note

For more information and details about NAV installation, you can check the Installation and Configuration Walkthroughs section at https://msdn.microsoft.com/en-us/library/dd301193(v=nav.90).aspx.

Microsoft Dynamics NAV deployments

A NAV deployment can essentially be as follows:

  • On-premise
  • On-cloud (IaaS or PaaS)
  • SaaS

With an on-premise deployment, Microsoft Dynamics ERP software is hosted at your own location on your own servers.

This type of architecture guarantees predictable performance (not subject to Internet connection related fluctuations in performance or availability), you can use the hardware and software infrastructure you already own, you can easily connect NAV with external systems that you can have inside your company, and obviously you have to guarantee data security (backup and so on) by yourself.

With on-cloud deployment, you can choose to deploy your NAV installation on the cloud by choosing from an Infrastructure as a Service (IaaS) architecture or a PaaS architecture. The Windows Azure platform permits you to have a complete NAV environment (virtual machine) totally scalable. Security is guaranteed by the Azure platform (redundancy, scalability, and so on).

Azure is the fastest and recommended way to implement a totally on-cloud NAV deployment.

The on-cloud deployment permits you to minimize your initial IT investments (no hardware costs, no IT staff for maintenance) and it supports your business as it grows (costs can scale with the actual use and needs of your solutions).

In an on-cloud deployment, you can choose to have the Microsoft SQL Server installed on a dedicated instance on an Azure virtual machine or you can use the Azure SQL database, a cloud service that permits you to have the SQL Server as a service, with reduced costs and no investments in database management tasks. With Azure SQL, you could also have a mixed deployment, where only the database tier is on the cloud.

There's also a very new option available on the market now: Microsoft Dynamics 365 for Financials (also known as Project Madeira).

Microsoft Dynamics 365 is a Software as a Service (SaaS) business proposition by Microsoft that aims to bring together the best of their CRM and ERP cloud offerings into one cloud service with specific, purpose built apps for each of your key business processes.

Microsoft Dynamics 365 for Financials is available on a simplified subscription model similar to the actual Office 365 offering and it guarantees a rapid ERP implementation (nothing to install or configure for the startup, no IT staff needed) and a familiar usage and user interface. You can work with Dynamics 365 from within Office 365 (no separate login to connect to the ERP) and you can do all your business from your familiar applications, for example, without having to leave Outlook (Dynamics 365 recognizes content such as invoice numbers inside an Outlook message and it suggests to you all the tools you need to process the document and complete your business process).

The interesting feature of this new SaaS ERP platform is that Dynamics 365 shares a Common Data Model (CDM) with Office 365. According to Microsoft's definition: it is a database of entities that are common across industry domains.

This new CMD provides all the standard business entities and it allows you to extend them and create new entities that suit your business. The CDM uses Azure technologies such as Service Fabric and Elastic SQL and it guarantees security, scalability, and consistency across applications.

The following screenshot shows an overview of the Dynamics 365 platform's architecture:

Microsoft Dynamics NAV deployments

Dynamics 365 is available in the following two editions:

  • Business (a cloud-based solution based on NAV core)
  • Enterprise (AX and CRM core)

Dynamics 365 is licensed by the following three features:

  • License by App: It will be licensed by app (you can activate a specific functionality you need).
  • License by Role (or by Plan): It will be licensed based on the role of your employees. Licensing by Role/Plan is a package of apps for companies that need to access multiple functions (for example when an employee works on Operations and Finance at the same time) 
  • License for team members: It will be licensed by team members (something like a light user):

Microsoft Dynamics NAV deployments

A big new feature of Dynamics 365 will be the app concept. Users will be able to go to Microsoft's dedicated marketplace called AppSource and download a range of applications to suit their specific needs. You can reach the AppSource website at https://appsource.microsoft.com:

Microsoft Dynamics NAV deployments

The new apps are built as extensions to the ERP core and they can be easily and independently deployed (you can pay for what you really need and use).

The new platform is natively integrated with Power BI and Cortana Intelligence. For example, you can install a feature from the Extension MarketPlace called Sales and Inventory Forecast and after a quick setup you can go on the item list, select an item, click the Forecast FactBox, and immediately see its sales and inventory forecast:

Microsoft Dynamics NAV deployments

The connection with Cortana Intelligence is given natively by the platform (no configuration needed), as shown in the following screenshot:

Microsoft Dynamics NAV deployments

Dynamics 365 is an ongoing project, and more and more features will be added in the coming months and years.

Differences between NAV deployments

Choosing the best NAV installation architecture is not always an easy task.

The first question that an IT staff has to decide is: should I go on-premise or should I want to embrace the cloud?

Normally, the ERP is a core software component for a company and this decision can affect your business a lot.

Statistically, about 49% of IT decision makers said that they are worried about the security implications of cloud services. Data protection, privacy, and availability are the main obstacles to cloud adoption.

But is this true?

When a company stores all its core data internally, it has more or less complete control over who can access the data and data availability. An IT decision maker normally considers the company's data more secured when it is stored in a data center that he/she can completely manage and protect from the devil outside world.

This could be true in theory, but the practice is often very different. Actually, there's no company that can guarantee a service level agreement and a security policy like the cloud. Obviously, a safe backup and data protection strategy must always be guaranteed, no matter if you go on-premise or on-cloud.

There are many other aspects to consider when choosing between on-premise or cloud-based solutions, as follows:

  • Infrastructure costs
  • Performance
  • Growth of solutions
  • Upgrades

Infrastructure costs

On-premise architectures require an initial investment in order to buy the required hardware and software and to have experienced IT staff to manage the system. Once the system is fully functional, you will also require costs and time for periodically maintaining and upgrading the entire hardware and software solutions.

In a cloud-based architecture, normally you have a much lower initial cost (pay-as-you-go) and you don't have to take care of hardware maintenance. The cloud platform gives you these services.

Performance

The main obstacle in this field is certainly the latency of Internet connection. When you're on-premise, everything is on your LAN and performance is managed by the internals.

On a cloud-based solution, Internet connection and bandwidth are a requirement that can affect your business a lot. If the Internet connection is missing, your business could be blocked. If the bandwidth is poor and network latency is high (too much delay in data communication over the network), your working experience could be a pain. You need stable and high speed Internet connectivity to go on-cloud.

Growth of solutions

When you start a project, normally you analyze all the requirements and at the final stage you arrive at a final hardware size structure that satisfies your needs and maybe your predictable growth:

  • In an on-premise solution, you have your hardware infrastructure that satisfies your actual needs. If one day you have to increase the growth of your architecture, you have to review your hardware and invest money for on infrastructure upgrades.
  • In a cloud-based solution, if your business has big growth or during peak periods, you can easily expand your solutions by increasing the calculation performance or expand your infrastructure in new regions, all in an easy, quick, and transparent way (scaling).

Upgrades

With an on-premise architecture, you have complete control over your infrastructure's upgrades (hardware and software) and you can decide what type of upgrade to apply and when to apply it.

In an on-cloud architecture, you could have some aspects of the infrastructure where upgrades are not completely under your control but they can be deployed globally from the solution provider.

Here's a comparison between the different types of Microsoft Dynamics NAV installation previously discussed (pros and cons):

On-premise

On-cloud with Azure VM

On-cloud with Azure SQL

SaaS (Dynamics 365)

Physical hardware is required.

No hardware is required.

No hardware is required.

No hardware is required.

IT staff (internal or partners) is required for infrastructure maintenance and SLA.

Infrastructure SLA comes from the Azure platform. IT tasks are reduced.

Infrastructure service level agreements (SLAs) come from the Azure platform. IT tasks are reduced.

No IT staff is required

Software installation is required (server + NAV + clients).

Server installation is deployed via the Azure portal.

Server installation is deployed via the Azure portal.

No installation is required.

Predictable performances, but is difficult to scale.

It is easy to scale as needed.

It is easy to scale as needed.

There is no control on scaling.

It is not dependent on Internet connection.

It is dependent on Internet connection.

It is dependent on Internet connection.

It is dependent on Internet connection.

It involves high startup costs.

It invovles medium startup costs.

It involves medium startup costs.

It involves low startup costs.

There are no costs per usage.

There are costs per usage (Azure VM).

There are costs per usage, based on database throughput units (DTUs) consumed.

There are costs per usage.

SQL Server license is required.

SQL Server license is required.

No SQL Server license is required (Azure SQL has different pricing).

No SQL Server license is required.

Maximum DB size is based on SQL Server license.

Maximum DB size is 16 terabytes (due to Azure VM disk restrictions).

Maximum DB size is actually 1 terabyte (via the P11 offering).

Actually, we have also a new value proposition by Microsoft: Microsoft Dynamics NAV Managed Services for Partners. With this PAAS proposition, Microsoft hosts your NAV database to the cloud and you build and sell your NAV solution to your customers.

This proposition could be interesting if your business model is repeatable, volume-oriented, and with a low cost of sale. The solution must be multitenant.

As a final consideration, we can say that nowadays a cloud-based solution has more benefits than risks. The only real limit to this choice is availability: if your cloud service shuts down or your Internet connection is down, your business could be at a huge risk.

If you decide to embrace the cloud for the deployment of a Microsoft Dynamics NAV architecture, you have to carefully check your Internet connectivity and bandwidth and you have to carefully choose your cloud provider. It has to guarantee a big uptime (SLA) over time.

Note

For the Microsoft Azure SLA, you can check out https://azure.microsoft.com/en-us/support/legal/sla/.

Performance and installation tips

For a successful NAV implementation, performance is an important aspect to consider and to carefully monitor.

The following are the main NAV points to check in order to have better performance:

  • Data tier (SQL Server Database)
  • Service tier
  • C/AL code

Data tier (SQL Server Database)

Microsoft Dynamics NAV relies on Microsoft SQL Server as its database, so recommendations on optimizing SQL Server performance for NAV are much the same as other types of data-intensive applications:

  1. Split the database into more data files and locate them on different disks.
  2. Every time a record is added, modified, or deleted from any table in the database, SQL Server updates all the indexes that are related to those tables. Check the indexes and re-build them periodically by using SQL Server Maintenance Plans. By rebuilding the indexes, you avoid fragmentation.
  3. Rebuild the indexes and recalculate the statistics (this is automatically done when you rebuild an index).
  4. Check your database Recovery Model and periodically shrink your transaction log.

SQL Server indexes are created on a column level in tables and views and they provide a quick way to retrieve data based on the values within the indexed columns. After frequent database operations (insert, update, delete) indexes can have pages where logical ordering (based on the key value) differs from the physical ordering inside the data file. This means that there is a high percentage of free space on index pages, and that SQL Server has to read higher number of pages when scanning each index. As a result, performances will suffer.

You can use this script to manually rebuild indexes on your NAV database:

    DECLARE @TableName varchar(255)  
 
    DECLARE TableCursor CURSOR FOR  
    SELECT table_name FROM information_schema.tables  
    WHERE table_type = 'base table'  
 
    OPEN TableCursor  
 
    FETCH NEXT FROM TableCursor INTO @TableName  
    WHILE @@FETCH_STATUS = 0  
    BEGIN  
    DBCC DBREINDEX(@TableName,' ',90)  
    FETCH NEXT FROM TableCursor INTO @TableName  
    END  
 
    CLOSE TableCursor  
 
    DEALLOCATE TableCursor 

Note

For more information, check the MSDN site at https://msdn.microsoft.com/en-us/library/hh169233(v=nav.90).aspx.

Service tier 

Here is a summary of the most important things to check.

Number of Microsoft Dynamics NAV service tiers

If you have many users, you have to consider creating more than one NAV service tier and balance the user's connection between the different services. In my experience, the number of users for the service tier without impacting on performance is about 40. If the number of your users is more than 40, you should start thinking about using more than one service tier.

Server memory

Each Microsoft Dynamics NAV service tier needs about 500 MB of memory to run and a certain amount of memory for every active session (even if idle). The standard amount of memory to count is about 10 MB per session, but obviously the more pages a user opens, the more memory usage increases.

Server CPU - cores and speed

This could be obvious, but if you have a fast CPU you will have better performance. The more cores you have, the more things in parallel you can do (the NAV service tier is 64-bit and multicore enabled). Idle sessions on the Microsoft Dynamics NAV service tier don't use any CPU power.

Data cache size

This is a Microsoft Dynamics NAV server setting, which is located in the CustomSettings.config file:

    <add key="DataCacheSize" value="9" /> 

The number specified in the DataCacheSize setting determines how much memory is used for caching the data:

Value

Memory

9 (default)

512 MB

10

1 GB

11

2 GB

12

4 GB

13

8 GB

14

16 GB

15

32 GB

When running a single tenant system (classic installation) the default value of 9 is probably good but on a multitenant installation (where the cache is shared between tenants) this value could be increased.

Metadata provider cache size

This is a Microsoft Dynamics NAV server setting, which is located in the CustomSettings.config file. It sets the metadata provider cache size (the number of objects cached). A value of 0 means the cache is disabled:

    <add key="MetadataProviderCacheSize" value="150" /> 

In the three-tier environment, objects are cached in the service tier. The value of 150 is default one but in my experience this value is too low. You can try to up this parameter and monitor memory load on the server.

Maximum concurrent calls

This is a Microsoft Dynamics NAV server setting, located in the CustomSettings.config file, and it's the maximum number of concurrent client calls that can be active on the Microsoft Dynamics NAV server.

To disable this setting, set the value to MaxValue:

    <add key="MaxConcurrentCalls" value="40" /> 

The more cores in your server, the higher this value can be.

Maximum concurrent connections

This is a Microsoft Dynamics NAV server setting, which is located in the CustomSettings.config file, and it's the maximum number of concurrent client connections that the service tier will accept. To disable this setting, set the value to MaxValue:

    <add key="ClientServicesMaxConcurrentConnections" value="150" /> 

Note

For more information about monitoring the Microsoft Dynamics NAV Server using performance counters, check the MSDN site at https://msdn.microsoft.com/en-us/library/dn414713(v=nav.90).aspx.

C/AL performance

Obviously, the way you write code on NAV can seriously affect performance.

C/AL (the NAV native language) has a set of commands optimized for SQL Server data access and your code should consider these new instructions. Here are a few basic things to remember:

  • Never use FIND('-') or FIND('+') but use FINDFIRST or FINDLAST instead (these are optimized for finding the single first or last record in the specified filter and range).
  • Use GET when you have to retrieve a record via a primary key.
  • When you want to retrieve a set of data or loop through it, use FINDSET. This function is optimized for finding and modifying sets of data, without creating cursors (and without using the FETCH commands called on SQL Server). However, this is only valid for the first 500 records (this number can be changed in the NAV database properties and can be increased if needed). After the default 500 records, the loop will still create a cursor, like in the old NAV versions. These are the general rules when using FINDSET:
    • FINDSET(FALSE,FALSE): This is a read-only command and uses no server cursors, and the record set is read with a single server call.
    •  FINDSET(TRUE,FALSE): This is used to update non-key fields. This uses a cursor with a fetch buffer (similar to FIND('-')).
    •  FINDSET(TRUE,TRUE): This is used to update key fields.

  • To check if a set of records contains data after filters have been applied, use the ISEMPTY function.
  • Avoid too many FlowFields on tables and pages.
  • Use SETAUTOCALCFIELDS when you have to retrieve data and request a calculation of associated FlowFields.
  • When you have to apply filters to a set of records, use the right index by using SETCURRENTKEY.

    Note

    For more information, check the MSDN site at https://msdn.microsoft.com/en-us/library/dd355237(v=nav.90).aspx.

  • It is recommended to check also the C/AL Coding Guidelines published by the NAV Design Pattern Team at https://community.dynamics.com/nav/w/designpatterns/156.cal-coding-guidelines.
  • You can perform C/AL performance testing by using tools such as the Microsoft Dynamics NAV performance testing repository in GitHub at https://github.com/NAVPERF. This is out of the scope of this book but it could be useful to bookmark the link.

Summary

In this chapter, we have covered the NAV architecture and we took an overview of the different NAV installations (on-premise, on-cloud, SaaS), discussing the pros and cons of each.

In the second part of the chapter, we analyzed the performance problems you can have in your NAV architecture and provided tips to help you rectify them.

In the next chapter, we'll see how to open a Microsoft Dynamics NAV implementation to the outside world by using the web services native functionalities of NAV.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Integrate NAV with various offerings of the Microsoft stack to create enterprise-ready and service-oriented solutions
  • Use Power BI and Universal Windows Platform for effective data analysis and real-time tracking with NAV
  • Discover the services offered by Microsoft Azure and implement them in different industries using real-world case scenarios

Description

Implementing Microsoft Dynamics NAV in the real world often requires you to integrate the ERP with external applications or solve complex architectural tasks in order to have a final successful project. This book will show you how to extend a Microsoft Dynamics NAV installation to the enterprise world in a practical way. The book starts with an introduction to Microsoft Dynamics NAV architecture and then moves on to advanced topics related to implementing real-world solutions based on NAV and external applications. You will learn how an enterprise distributed architecture with NAV at the core can be implemented. Through a series of real-world cases on every topic and every industry (sales, retail, manufacturing, distribution, healthcare, and so on), you’ll see step by step how to efficiently solve a technical problem. These common problems encountered in a NAV implementation will be solved using the entire technology stack that Microsoft offers. By the end of the book, you will have the knowledge to efficiently solve certain scenarios, you will know which is the best solution architecture to propose to a customer and how to implement it.

Who is this book for?

This book is for NAV developers and solution architects who need to implement real-world enterprise solutions based on Microsoft Dynamics NAV. Knowledge of the NAV programming language (C/AL) and C# language is recommended. Knowledge of ASP.NET and Visual Studio development would help, but is not necessary.

What you will learn

  • Configure NAV Web Services and create external applications with Visual Studio, .NET, and .NET Core
  • Solve technical architectural problems by implementing enterprise solutions with NAV
  • Develop applications and solutions with Microsoft Dynamics NAV and the Microsoft technology stack
  • Create a Power BI dashboard for rich reporting and NAV data analysis
  • Find out how to transmit your device location from a UWP application to NAV in order to implement a distributed solution for managing couriers in a sales company
  • Make the most of Microsoft Azure and its services
  • Create enterprise solutions with NAV by using Azure App Service
  • Use Azure Service Bus for managing distributed NAV applications
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 22, 2017
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781787123083
Vendor :
Microsoft

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Poland

Premium delivery 7 - 10 business days

zł110.95
(Includes tracking information)

Product Details

Publication date : Mar 22, 2017
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781787123083
Vendor :
Microsoft

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 740.97
Programming Microsoft Dynamics NAV
zł246.99
Mastering Microsoft Dynamics NAV 2016
zł246.99
Building ERP Solutions with Microsoft Dynamics NAV
zł246.99
Total 740.97 Stars icon
Banner background image

Table of Contents

10 Chapters
1. Introduction to Microsoft Dynamics NAV Architectures Chevron down icon Chevron up icon
2. Configuring Microsoft Dynamics NAV Web Services Chevron down icon Chevron up icon
3. Creating an Application Using NAV Web Services Chevron down icon Chevron up icon
4. Using NAV Web Services with Microsoft Power BI Chevron down icon Chevron up icon
5. Integrating NAV Web Services and External Applications Chevron down icon Chevron up icon
6. Extending NAV Pages with Control Add-ins Chevron down icon Chevron up icon
7. Programming Universal Windows Apps with NAV and Devices Chevron down icon Chevron up icon
8. Exploring Microsoft Azure and its Services Chevron down icon Chevron up icon
9. Working with NAV and Azure App Service Chevron down icon Chevron up icon
10. Implementing a Message-Based Architecture with Azure Service Bus and NAV Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela