Mastering Microsoft Dynamics NAV 2016 - Rabindra Sah - E-Book

Mastering Microsoft Dynamics NAV 2016 E-Book

Rabindra Sah

0,0
44,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

The book begins by giving you a brief introduction to setting up your NAV environment and shows you how to install and configure it according to your requirements. You will then dive deep into the latest design patterns, network architecture, and topologies. We will show you how you can integrate NAV with the Microsoft platform, and secure your deployment by managing roles and permissions.

Moving on, we will explain how to monitor and manage server instances using the Administration tool. We’ll discuss how you can take advantage of the expanded extensibility and connectivity capabilities for a tighter integration with the cloud as well as handheld devices. Then, we’ll show you how you can make use of the PowerBI capabilities that have been built into Dynamics NAV.

By the end of the book, you will be confident in developing and administering a Dynamics NAV implementation that will leverage all of the new features.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 351

Veröffentlichungsjahr: 2017

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Mastering Microsoft Dynamics NAV 2016
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Microsoft Dynamics NAV Installation
The background- before we start
Architectural components
Three-tiered architecture
NAV Application Server
Multiple configurations
Multitenant environment
Azure (cloud service)
Differences between on-premise and cloud
Microsoft Azure - relevant services
Microsoft Azure Management Portal
Three-service model
Infrastructure as a Service
Platform as a Service
Software as a Service
Difference between on-premise, SaaS, PaaS, and IaaS services
Introduction to the NAV Universal application
Out-of-the-box tools in the Installation DVD
Folder with numbers such as 1029-4105
License.rtf
setupres.dll
devitpro.chm
ADCS
ClickOnce Installer tools
CRM customization
Outlook
Prerequisite components
Role Tailored Client
SQL Demo database
Test toolkit
Upgrade toolkit
Windows PowerShell Scripts
Microsoft SQL Server requirements for Microsoft Dynamics NAV
Data encryption between MS SQL Server and Microsoft Dynamics NAV 2016
Using Azure SQL Database
Microsoft Dynamics NAV PowerShell
Dynamics NAV tools
Where in NAV are we with PowerShell?
Using PowerShell
Getting started with PowerShell
Patterns of scripting
Understanding the PowerShell cmdlets
Commands for server administrators
Commands for implementers for company management
Commands for administrators for upgrades
Commands for administrator for security
Commands for developers
Practice with PowerShell
Installation scenarios
ClickOnce installation
Prerequisite list
High-level steps
Detailed steps
ClickOnce installation using File Share
Prerequisite list
High level steps
Detailed steps
Upgrading the Windows client using ClickOnce
Installing NAV on Azure VM using PowerShell
Prerequisite list
High level steps
Detailed steps
Steps needed to prepare PowerShell commands
Deploying Microsoft Dynamics NAV 2016 database on Azure SQL database
Prerequisite list
Creating a database in Azure
Creating a virtual machine
Installing NAV on a multitenant environment
Prerequisite list
High-level steps
Detailed steps
Post-installation operations
Summary
2. Upgraded Features and Configuration in Dynamics NAV 2016
Dynamics NAV 2016 Design Patterns
Architectural Design Pattern
Implementation Pattern
Design Pattern
Implementing the Activity Log Pattern
Setting up a change log
Viewing the Change Logs Entries page
Redesigned C/AL Editor
Event channels on Microsoft Dynamics NAV Server events
Multiple namespaces on XMLports
Updating custom report layouts using upgrade codeunits
Finance is an important business domain in Microsoft
Microsoft Dynamics NAV 2016 Reporting enhancements
Benefits for the users
Word forms and e-mail
Microsoft Dynamics NAV 2016 Preview Posting
Benefits of Preview Posting
Microsoft Dynamics NAV 2016 Positive Pay
Benefits of Positive Pay
Microsoft Dynamics NAV 2016 North America document totals
Benefits
Sales order processing
Microsoft Dynamics NAV 2016 Deferrals
Benefits
Microsoft Dynamics NAV 2016 works natively with Azure SQL
Benefits for the user
Cost
Administration
Service -level agreement and compliance
Business continuity
Benefits for partners
Predictable performance and scalability
Setup and admin
Simple migration path
Familiar SQL Server tools and APIs
Understanding Development Environment
Changing the database size
Database schema synchronization
Workflows in Microsoft Dynamics NAV 2016
Introduction to workflow
Setup required before using workflow
SMTP Mail setup
Job queues
Approval User setup
Workflow User Group
Notification Setup
Workflow demo
Setting up the conditions
Testing the workflow
Output of the workflow
Latest features in Microsoft Dynamics NAV 2016
Test automation suites
Universal App on all devices
The Web Client enhancements
Working with Microsoft Dynamics CRM
Working natively with Azure SQL
Extensions
Document management
Workflows
E - Everything
Power BI
Office 365 integration
Strategy and roadmap
Summary
3. The C/AL and VB Programming
Coding with C/AL
Reusing code
Best programming practice for C/AL code
Multi-language functionality
Activating objects
The Dialog.OPEN function
Example of a progress indicator
Some basic rules
Variables and constants
Avoiding deadlock
Locking orders
Journals
Non-posted lines and headers
Posted lines and headers
Ledger entries and registers
Naming conventions in C/AL
Compiler design
Preprocessor
Compiler
Assembler
Preprocessing into C# code
Triggers
Documentation triggers
Event triggers
Function triggers
Exception handling
Creating a Try function
Phase 1
Phase 2
Microsoft Dynamics NAV Reports
Report design
The request page
The report viewer
Interactive sorting and visibility toggle
Visual Basic programming
Creating variables
Set and Get functions
Decision functions
The IIf() function
The Switch() function
Summary
4. Testing and Debugging
Software testing lifecycle
Testing in Microsoft Dynamics NAV 2016
Automated testing
Testability framework build in NAV
Handler function
The TestRunner codeunit
Writing your own Test unit
Debugging using Visual Studio Debugger
Summary
5. Design and Development Considerations
Starting the customization process
Dynamics NAV setup and customization
Convincing the customer
Customization and development
Application lifecycle
Design
The flaws in application design
Design consideration
Development
Some of the specialized functions in C/AL
Database schema synchronisation
Table fundamentals
Conditional table relation
Database schema synchronisation
Page fundamentals
ShowMandatory
UpdatePropagation
Scope
Page controls
Expressions as property values
Control trigger
Object metadata virtual tables
Design and development considerations for Report design
Object designer fundamentals
Team development features
Locking
Unlocking
Force Unlock
Auto-Lock
Physical and logical databases
Considerations while coding
The Try function
The CURRENTCLIENTTYPE function
The DefaultClientType function
Report fundamentals
Grouping and totaling
Saving reports in other formats
Important Report functions
Codeunit
The user of a SingleInstance codeunit
The limitations of codeunit
.NET interoperability
Test posting
Summary
6. Version Control and Code Management
Version control
GitHub
Setting up GitHub for Dynamics NAV
Preparing an object for the repository
Basic operations in GitHub
Team Foundation Server/Services
TFS setup for Dynamics NAV
Pros and cons of branching
Branching for a big modification project
Branching for small isolated modifications
Branching for mixed type modification
Summary
7. Tuning Up the NAV System
Tuning up the NAV environment
Optimizing SQL Server performance
Data access
Database information
Collation setting
Database and log files
The relationship between tables
Table keys and performance
Bulk insert
SumIndexfields functionality
Performance tuning in reports
Creating new reports
Dataset considerations
Use of the Temporary table
Number formatting
Looking at layout considerations
Disabling Print Preview
Avoiding conditional visibility
Load testing
Algorithm
Natural things to ask
A framework to analyze the given algorithm
Time complexity
Determining the time complexity of the algorithm
Counting primitive operations
The Big Oh notation
Basic rules for computing asymptotic running time
Rule 1: For loops
Rule 2: Nested loops
Rule 3: Consecutive statements
Rule 4: If/else
Summary
8. Security in Dynamics NAV 2016
Software design principles
Open design
Least privilege
Complete mediation
Economy of mechanism
Fail-safe defaults
Separation of privilege
Psychological acceptability
Security policy
Security policy goals
Access Control Matrix
Internal organizations
Data classes
Public data
Development data for existing products
Development data for future products
Corporate data
Customer data
User classes
Authentication
Strong password
Defining the password policy
Defining an account lockout policy
Access control
Roles and permissions
Ownership of objects
Inheritance of permissions
User rights
Virus protection
Best practices for virus protection
Network security strategies
Wireless networks
Cryptography and certificates
Certificate authority
Authentication policy for CA
Kinds of certificates
Security updates
SQL Server security settings
AZURE security setting
Summary
9. Upgrade and Migration
The need for upgrade
Upgrade considerations
Custom object review
Customization upgrade analysis
Business process analysis
Reviewing your dimension structure
Upgrading from older versions
Technical upgrade
The upgrade workflow
Diagnostic phase
Analysis phase
Design phase
Development phase
Deployment and operation phase
Upgrading estimates
Code upgrade
Object transformation
Data upgrade
Testing and implementation
Upgrade tools
Dynamics NAV upgrade toolkits
Data conversion tools
The FOB file
Upgrade guide
Application test toolset
PowerShell cmdlets
Scripts for code upgrade
Script for data upgrade
Summary
10. Interfacing NAV with Other Applications
Web services
Web service as a reusable unit
Web services in Microsoft Dynamics NAV
The architecture of web services
Publishing a web service
SOAP web services
Basic page operations
Standard set of page operations
Basic codeunit operations
Hiding the function from being published
ODATA web services
Combining multiple datasets
Using ODATA for APIs
Handling UI interaction for web services
Functions not to use
Using external web services in NAV
DotNet interoperability
Open Database Connectivity
Summary
11. Extending Dynamics NAV 2016
Integration with Power BI
Understanding datasets
Understanding reports
Integration with Jet Express
Configuring the data source from Excel
NAV extensions
Prerequisites
Customization in Dynamics NAV
Creating the NAVX file
Publishing and testing the extension
Summary
12. The Future of NAV
Dynamics NAV 2017 (10.00)
Microsoft Dynamics 365
Dynamics 365 Enterprise
Dynamics 365 Business
Dynamics 365 for financials
Visual Studio Code (Development Environment)
Dynamics NAV extensions
Summary

Mastering Microsoft Dynamics NAV 2016

Mastering Microsoft Dynamics NAV 2016

Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2017

Production reference: 1170317

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham 

B3 2PB, UK.

ISBN 978-1-78646-430-9

www.packtpub.com

Credits

Author

Rabindra Sah

Copy Editor

Stuti Srivastava

Reviewer

Danilo Capuano

Project Coordinator

Vaidehi Sawant

Commissioning Editor

Aaron Lazar

Proofreader

Safis Editing

Acquisition Editor

Denim Pinto

Indexer

Tejal Daruwale Soni

Content Development Editor

Priyanka Mehta

Graphics

Abhinash Sahu

Technical Editor

Dhiraj Chandanshive

Production Coordinator

Nilesh Mohite

About the Author

Rabindra Sah is a Microsoft Dynamics NAV technology specialist. He started his career as a Dynamics NAV consultant in the year 2011 with a Microsoft gold partner company in Nepal, where he fortified his functional skillset and evolved as a versatile Dynamics NAV professional. His hunger to solve problems and positive communication skills helped him flourish as an all-round consultant. His deep understanding of the Dynamics NAV system allowed him to successfully implement the company's first international project, which was funded by International Red Cross and Red Crescent Society. He has been a part of more than 12 full-phase Dynamics NAV projects and has earned several appraisal certificates from the clients and donor organizations for his extraordinary dedication and co-ordination.

Rabindra is a technology enthusiast and quick learner of new technologies, which has allowed him get along with the latest Microsoft releases and related technologies. In addition to Dynamics NAV expertise, Rabindra also has a deep understanding of .NET technologies. Besides .NET, he also possesses a deep-level understanding of programming languages such as C and Java, which broadens his domain of competence. He believes that learning and sharing should go hand in hand, so, he is also an active member of online Microsoft communities, where he loves spending his time resolving the issues posted by other developers and end users. He is also an active blogger and loves to post problems and solutions that he comes across in his daily professional life.

To further improve his skills and better understand the evolving Dynamics NAV system, he recently took several on-campus courses, such as algorithms, design patterns, software engineering, and enterprise architecture, during his Master’s in Computer Science at Maharishi University of Management in United States.

He is also an active volunteer item writer for Association of Dynamics Professionals for Microsoft Dynamics NAV Certification, where he participates in online meetings and contributes to the design of the certification examinations. He also creates materials for the examinations. Recently, he also got involved in the Microsoft Dynamics NAV courseware project lead by some of the best brains in the field.

He is currently working as a Senior Associate for Microsoft Dynamics NAV in RAND Group, a Microsoft gold partner company, in Texas, USA.

You can find him on LinkedIn at https://www.linkedin.com/in/rabindrasah.

I am very grateful to God and to everyone who kept me motivated and encouraged me throughout the process of this book.

First of all, a special thanks to my parents--my mom, Pramila Sah, and my papa, Shatrughan Sah; my grandpa, Sri Narayan Sah; my family, Om Shankar Sah, Govind Sah, Umida, and Shaanvi; other family members, Bipin, Navin, Meena, Uday Shankar, Hari Shankar, and Punita; my special friend Anjani, and my close friends Rohit, Navin, Shamid, and Pavan, who always stood behind me and allowed me to spend a lot of time apart from them.

A big thanks to Robert Sherlock, Donnita Bass, Thu Tran, and Anatoly Sinyavin for helping me grow as a better professional these past years.

I would also like to thank my university, Maharishi University of Management, and all the professors there who helped me fortify my technical skills and gain enough confidence to aim for higher goals.

I would like to extend my thanks to the editors and all the members at Packt who directly or indirectly helped me on this book, especially, Priyanka, Denim, and, last but not least, Danilo Capuano.

About the Reviewer

Danilo Capuano is a senior Software Engineer with over 10 years industry experience. He lives in Naples, Italy, where he earned a degree in Computer Science. He currently works as a Solution Architect on Microsoft Dynamics 365 NAV in an IT company.

You can contact him on his official website, http://www.capuanodanilo.com/, or find him on Twitter at @capuanodanilo.

He has reviewed the books, Microsoft Dynamics NAV 7 Programming Cookbook, Microsoft Dynamics NAV 2013 Application Design, and Programming Microsoft Dynamics NAV 2015, all by Packt.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1786464306.

If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Preface

The goal of this book is to explain Microsoft Dynamics NAV 2016 from the root level and understand the different capabilities of the system. The book will give you a deep understanding of the system, which will help you to improve your activities such as development, implementation, testing, version control, and maintenance. The book heavily focuses on the methods for improving the performance of the system so as to minimize the cost on one hand and improve the productivity and user experience on the other. The book mostly covers real-life scenarios and presents solution in simplified manner to engage all kind of readers.

After reading this book, you will understand the different features, techniques, and technologies that directly impact on the implementation of the system. The book focuses on reducing the time and increasing the productivity of developers, consultants, and administrators and provides the ways to handle the process in a standard fashion.

What this book covers

Chapter 1, Microsoft  Dynamics NAV Installation, explains about the installation process of Microsoft Dynamics NAV 2016 in detail. It mostly covers the cloud technologies and how NAV can be deployed on cloud. The chapter also explains in detail how PowerShell can be better utilized to make life easier

Chapter 2, Upgraded Features and Configurations in Dynamics NAV 2016, helps you understand the different components that take part in configuration processes. The chapter covers most of the latest features and their implications in Microsoft Dynamics NAV 2016. You will get an overview on design pattern and their significance to the system.

Chapter 3, The C/AL and VB Programming, explains the core concept of coding with the C/AL programming language and the compilation details. You will get some hands-on practice with VB programming if you follow the contents carefully. The main intention of this chapter is not to provide the details about the functions and features, but provide the core concept which will boost the concept of computer programming with respect to C/Side Development Environment. This chapter is highly recommended, not only for technical professionals, but also for non-technical readers.

Chapter 4, Testing and Debugging, shows you how to find out the testing technique in Microsoft Dynamics NAV 2016. Here you will also learn how to write your own test code and test it yourself. In addition to the self-generated unit test, we will examine the test codeunit provided by Microsoft which is more than 600 in count. You will learn how they can be used to test the standard process. This chapter will discuss the core concept of testing with respect to the Dynamics NAV system.

Chapter 5, Design and Development Considerations, explains the design and development considerations of Microsoft Dynamics NAV. Most consultants do not understand the importance of design considerations and they end up generating a weak design, and eventually an inefficient system. This chapter is intended to provide a broad perspective on how to approach any design or design operation, and how to convert that design to the actual development. The chapter will also clarify the difference between customization and development. It also explains how you can understand the dataflow using a special feature called test posting.

Chapter 6, Version Control and Code Management, covers totally new concept of version control, which is somewhat new to the Dynamics NAV world. For most experienced consultants and developers who have strong C# and other programming experience, this concept might not be that new, but those who have always worked with the NAV system might perceive this as being new. You will learn the most basic ways to harness some of the functionality of version control in Dynamics NAV. For some, it might look like a lengthy process to actually implement, but once you understand the core concepts, you will love it and implement it in team projects in particular. In this chapter, you will also understand the pattern that can be used while branching and how it can be of great importance while using version control.

Chapter 7, Tuning Up the NAV System, shows how you can avoid designing a low performing system  in the first place, and secondly you will observe how you can better optimize low performing system. It is essential to understand the core of the system and its performance in standard given condition so that we can easily sense any slowdown in the system.

Chapter 8, Security in Dynamics NAV 2016, explains all about security aspects of the Microsoft Dynamics NAV system. You will be able to consider some of the important contents of security system. You will also understand how to prevent your system from different malicious logics and how to reduce the risk of security failures. It is highly recommended for everyone, especially administrators, to understand the concepts in this chapter in order to provide a robust defensive environment to the Microsoft Dynamics NAV.

Chapter 9, Upgrade and Migration, explains about the modern upgrade process. You will also get an overview of the most optimal and efficient ways of upgrading process, which involve automating the processes, analyzing the time and effort, and understanding the core concept behind the upgrade project. You will also perceive the difference between the upgrade processes if carried out on different versions and how that might affect the project duration.

Chapter 10, Interfacing NAV with Other Applications, helps you understand the most important concept of integration with external systems. An interface is like a trade route through which the outside world can help your system grow. The best software has the most secure and powerful integration system so that it can be extended as per your requirements. Here you can learn all the concepts that can be used in Microsoft Dynamics NAV to make it an even better and stronger solution.

Chapter 11, Extending Dynamics NAV 2016, helps you understand the different integration concepts of the Dynamics NAV 2016 system with other Microsoft and related technologies. You will learn how you can better utilize the power of other languages and technologies in the Dynamics NAV system. You will also get a glimpse of different reporting tools, some NAV based extensions, and how they can be implemented along with Dynamics NAV system.

Chapter 12, The Future of NAV, covers an overview of major future products from the perspective of Microsoft Dynamics NAV 2016. In addition to the future releases of Microsoft Dynamics NAV, you will also see an overview of closely related technologies such as Dynamics 365, which is one of the most talked about and most confusing technologies in terms of future of Dynamics technology. You will also find out about the new development environment, which can be used to develop vertical solutions such as extensions, with a simple interface.

What you need for this book

The following software is required for this book:

Microsoft Dynamics NAV 2016Visual Studio Community EditionVisual Studio Data ToolOnline subscription to Azure and Office 365Online subscription for PowerBI, Dynamics 365SQL Server 2014 Management StudioMicrosoft Office 2016Internet Explorer 11Notepad

Who this book is for

This book is ideal for administrators, developers, and consultants who are looking to take their knowledge of Dynamics NAV to new heights. You're expected to have a basic knowledge of Dynamics NAV workflows and C/AL, C/SIDE development.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Also call this local function, AddItem, into the OnRun trigger."

A block of code is set as follows:

LOCAL AddItem() CLEARLASTERROR; IF ExceptionHandle.Try('12345','MyTestItem') THEN MESSAGE('Item added Successfully') ELSE MESSAGE('Error Returned Error : %1 - %2', GETLASTERRORCODE,GETLASTERRORTEXT);

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

LOCAL AddItem() CLEARLASTERROR; IF ExceptionHandle.Try('12345','MyTestItem') THEN MESSAGE('Item added Successfully') ELSE MESSAGE('Error Returned Error : %1 - %2', GETLASTERRORCODE,GETLASTERRORTEXT);

Any command-line input or output is written as follows:

C:\Python34\Scripts> pip install -upgrade pipC:\Python34\Scripts> pip install pandas

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "In the Report Properties window, click on the code option in the left pane."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

Log in or register to our website using your e-mail address and password.Hover the mouse pointer on the SUPPORT tab at the top.Click on Code Downloads & Errata.Enter the name of the book in the Search box.Select the book for which you're looking to download the code files.Choose from the drop-down menu where you purchased this book from.Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR / 7-Zip for WindowsZipeg / iZip / UnRarX for Mac7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-Microsoft-Dynamics-NAV-2016. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

Chapter 1. Microsoft Dynamics NAV Installation

Have you ever had the chance to spend a night at a sea-side cottage, where you can appreciate the vast endlessness of nature from a window? It captivates our imaginations and instills a desire to understand the vastness of this creation.

Let's change the perspective and visualize the same sea from a height (let's say, from a space station), and you can see all its boundaries, its size, and its color and understand its significance. Similarly, if you want to understand a software, then you have to see it within a broader context. It allows us to intake the most out of it in an optimum way.

Now, returning to the ground, instead of the sea-side, here we will discuss C/SIDE, and instead of an ocean, we will discuss the vastness of Microsoft Dynamics NAV 2016.

Here, in this chapter, we will learn about the different new technologies that have been implemented in the installation process of Microsoft Dynamics NAV 2016. The chapter will also guide you through the step-wise installation process with detailed diagrams and screenshots.

The chapter intends to clear the confusion about PowerShell, which is an essential component of the Administration section in the Microsoft Dynamics NAV world. Microsoft has made PowerShell compulsory in some sections. The chapter requires a basic-to-medium level knowledge of the installation process. We will not include the basic installation steps so as to save time and space, and will focus more on the current hot topics in the field of NAV Installation.

At the end of this chapter, we will explain the different terminologies and techniques used by expert NAV Administrators. This chapter is intended for those whose systems are on-premise, and who are looking to better manage it on-premise, or are planning to opt for cloud technologies.

In this chapter, will cover the following points:

Architecture of the different models that are used while installing the systemDetails on the cloud technology and how it is usefulDifferences between installation environmentsWalkthrough of installation and deployment scenarios on different platformsDetails on PowerShell and its usage

The background- before we start

Microsoft Dynamics NAV 2016 is a Microsoft Product, which delivers a complete ERP Business solution for small- and medium-sized organizations. You might want to know why this software package is not suitable for large industries; let's investigate this.

First, let's understand the difference between a large customer (Enterprise-level industry) and a smaller customer (Small and Medium business) from the ERP perspective. The ERP software sees a customer as a large enterprise if the number of employees is over 5,000. A company with lesser number of employees but a greater turnover can also be taken as an Enterprise-level customer. Another key factor in determining the size of a company is the size of data, whether it is high or low.

There are cases where Microsoft Dynamics NAV has been implemented in companies with 500, 1000, and even a couple of thousand users. But the main idea behind choosing the right ERP Software depends on many factors such as the following:

FunctionalityPerformanceInterface and integrationOut-of-the-box featuresFuture customization requirementCostMaintenance

As a consultant, our duty is to determine the best solution, and convince the customer on that. We must make sure that the system covers all the functionalities, or most of it. The performance should be within the acceptance limit. Their system should be equipped with sufficient interfacing API and services so as to integrate the updates and third-party integration, as the customer might like to integrate some in the future. It should provide out-of-the box customization features so that the client does not have to rely heavily on the developers for small changes. This, in turn, can be one of the most decisive factors, as modern users want some level of control with themselves. The system should guarantee easy and cost-effective customization if requested by the user. It should not be rigid. The cost of the system should be within an acceptable range, since clients have a budget for the product implementation. Last but not least is the maintenance cost; if the cost of maintaining the software is too high, then it is less likely that the customer is going to choose the product. Most of the customers also want to know the maintenance time requirement of the system.

Here we can conclude that there is a very thin line when we want to select the right product, since some of the products have a stronghold in some of the aforementioned points, while others have advantages regarding other points. We should spend an ample amount of time determining the right product for our client. Thankfully, Microsoft Dynamics NAV fulfills most of the criteria mentioned here, and so, it is the leader in the Dynamics family when it comes to the number of satisfied customers and number of implementations.

Architectural components

Microsoft Dynamics NAV can be installed on-premise, as well as on cloud. It is the most flexible and robust product of the Microsoft Dynamics family. Microsoft Developers have worked a lot on installation and configuration, which allows the product to have multidimensional installation options. It can be easily deployed to a multitenant environment. It supports PowerShell, which is like a magician, and provides added power when it comes to administering and installing the system. Installation of Microsoft Dynamics NAV 2016 on Azure is one of the key points to look for. We will be more focused around these points in this book.

I have tried to show the easiest and most efficient ways to accomplish the installation process in this chapter. There might be other ways, but I have tried to stick with the simplest one.

We should always install three core components of Microsoft Dynamics NAV 2016, which are the three tiers that comprise the core of NAV Architecture.

Three-tiered architecture

Like previous RTC versions, the Microsoft Dynamics NAV 2016 architecture is a three-tiered architecture, which uses three core components as follows:

Tier 1

Tier 2

Tier 3

Client Tier

Middle Tier

Data Tier

RTC (Windows Client/ Web client, web-service clients (SOAP Web Services and OData Web Services), and an NAS services client for programmatic access)

Microsoft Dynamics NAV Server

SQL Database Server (Application Database, Tenant Database)

Client User Interface

For example: Frontend Application-RTC

Multitenant server, which manages business logic and all kinds of communication.

For example: Multitenant Server-Development Environment

Database Server of Data layer

For example: SQL Database server-Database

Here in the following diagram, you can clearly understand the different tiers in the Microsoft Dynamics system:

NAV Application Server

NAV Application Server, or NAS, is a middle-tier server component, which can be utilized without a user interface for task scheduling, client offloading, and specialized integration scenarios. Since, it executes business logic without any user interaction, they are managed completely from the Microsoft Dynamics NAV server administration tools in the NAS Services tab:

It is always better to create a Microsoft Dynamics NAV server instance for each NAS services application. The following are the two main reasons:

ConveniencePerformance

Whenever you use NAS services for Microsoft Office Outlook integration, managing job queues, create a separate Microsoft Dynamics NAV server instance for each NAS service application, then modifying the setting for one of these services will not affect other services. On the other hand, configuring NAS services applications to use separate server instances makes better use of the server resources. This lets you run more applications with less degradation.

Multiple configurations

We can implement multiple configurations for the three-tier architecture in Microsoft Dynamics NAV.

The core components that comprises the tiers must be installed. We can choose a single machine for all the three tiers, or a separate machine for each tier.

Multitenant environment

There are various architectures that can be implemented for the Microsoft Dynamics NAV installation process. It all depends on the requirements. If there is a need of a single database system for a single group of users, then multi-tenancy has not much significance. But when we are trying to implement Dynamics NAV as a SaaS, keeping the system constant for multiple clients, then the significance of multi-tenancy comes into play.

Note

Multi-tenancy is a software architecture where a single instance of the software runs on a server and supports multiple customers or tenants.

In a multi-Tenant environment, we keep the business data of each tenant (client) in different databases while keeping all the SQL Server application objects in a different database.

Because of the level of separation between the three layers, now we can use the same shared NAV objects with more databases.

Each tenant can hold one or more companies, as depicted in the following diagram:

Azure (cloud service)

Microsoft Azure is an infrastructure and cloud-computing platform, which helps us solve problems such as building, deploying, and managing different applications. They are implemented by huge datacenters managed by Microsoft Corporation. It initially started with the IaaS service, but later also started providing PaaS.

Differences between on-premise and cloud

This quick public cloud adoption can be explained by several factors such as the following:

Minimal up-front investments or commitments are requiredYou pay for what you useUsers can test any of the services prior to purchaseLess human resources are required for infrastructure maintenanceService offerings are easy to compareSoftware upgrades can be automated

The latest member of the Dynamics Family, Dynamics 365, is not hosted on Azure, since Azure does not provide SaaS.

The difference between on-premise and the different cloud services can be better understood by the following diagram. As you can see, in on-premise setup you have different levels of control whereas in the cloud services the controls and access are limited:

Microsoft Azure - relevant services

There are a number of relevant services that play an important role during the deployment process. They are as follows:

Virtual machines (Dynamics NAV SQL Server)

Virtual machines services are similar to the on-premise environment and the installation is also pretty much the same.

Cloud services (Ports load balancer scale fail over)

A cloud service has one public IP-address. It is located in a region or affinity group. It is possible to link to the owned domain. It can contain multiple VMs with local IP addresses.

All the VMs can be accessed via endpoints on the cloud service. Endpoints can be loaded-balanced or port-forwarding.

Storage (Hard disks backups)

Storage in Azure contains hard disk space where we can put backup, PowerShell commands, and other files.

Network VPN (VM network)

Network VPN helps extend the private network space in the public domain where you can define other virtual machines, or VM. Each VM has a unique IP address in the same subnet so that they can see each other and communicate as per the command.

Active Directory (User directory synchronized from AD Office 365 users)

Azure Active Directory provides identity and access monument. It can be integrated with the on-premise Active Directory. It can also be used to Integrate with Dynamics NAV.

Microsoft Azure Management Portal

Use the link, https://manage.windowsazure.com/, in order to access the management portal of Windows Azure. It manages all Azure Services. Also, PowerShell is available for more options (this topic is covered in detail in a later part of this chapter).

Note

To access the link https://manage.windowsazure.com/, make sure you have a subscription for Windows Azure.

Three-service model

Cloud computing offers its services in three different models: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). These models offer increasing abstraction. The following diagram shows how services provided using the same channel have been categorized so as to keep it easy to understand:

Infrastructure as a Service

Infrastructure as a Service helps companies to move their physical infrastructure to the cloud with a level of control similar to what they would have in a traditional on-premise data center. Core data center infrastructure components are storage, servers (computing units), the network itself, and management tools for infrastructure maintenance and monitoring. These are depicted in the following diagram:

Infrastructure as a Service taxonomy

Note

IaaS includes virtual machines, servers, storage, network gear, and any other hardware/OS.

Platform as a Service

Platform as a Service provides the user with a configurable application platform including a preinstalled software stack. PaaS can be understood as another abstraction layer above the hardware, OS, and virtualization stack:

Platform as a Service taxonomy

Software as a Service

PaaS provides execution runtimes service without direct access to the OS (databases, development platforms, and application servers).

Software as a Service is a cloud services delivery model, which offers an on-demand online software subscription.

The latest SaaS release of Microsoft is Dynamics 365 (previously known as Project Madeira). The following diagram illustrates the SaaS taxonomy. Here you can clearly understand different services such as Sales force, NetSuite, and QuickBooks which are distributed as SaaS:

Software as a Service taxonomy

Note

SaaS includes software services such as Microsoft Office 365, Microsoft Dynamics 365, and so on.

Difference between on-premise, SaaS, PaaS, and IaaS services

In an on-premise architecture, one needs to take care of all the services and layers of the software system starting from the network layer up to the application layer (client). Here, the cost of maintenance is high, and it is a redundant service.

In IaaS, Microsoft provides a virtual abstraction of the operating system, which can be used as any on-premise operating system, and hence it lowers the cost of maintaining low-level systems.

In PaaS, a specific platform is exposed to the user so as to make the service even more precise and the user is concerned only up to the platform he/she is using; all the layers below it are managed by Microsoft.

SaaS is the latest of all services, where specific software can be isolated from all those complex layers. The user just needs to worry about the software layer, and everything beyond that is handled by the cloud factory. It is the easiest and most efficient model in cloud technology.

Introduction to the NAV Universal application

Nav Universal is an application designed for phones and tablets to run Microsoft Dynamics NAV. It is the client-side part, which offers portability and flexibility of usage. It is basically targeted at small- and medium-sized businesses which want to access data from a hand-held device, on the go.

In general day-to-day use, these apps are used for functions such as the following:

Approving invoicesGetting an overview of businessViewing the progress reportLightweight data entryChecking the status of documents

The following diagram illustrates the architecture of the NAV Universal application in details:

The Microsoft Dynamics NAV Tablet client and Microsoft Dynamics NAV Phone client support the same credential types as the Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV Web client.

Out-of-the-box tools in the Installation DVD