Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Overview of Important Concepts of Microsoft Dynamics NAV 2016

Save for later
  • 900 min read
  • 2017-06-19 00:00:00

article-image

In this article by Rabindra Sah, author of the book, Mastering Microsoft Dynamics NAV 2016, we will cover the important concepts of Microsoft Dynamics NAV 2016.

 

(For more resources related to this topic, see here.)

Version control

Version control systems are the third-party system that provides the service that tracks changes in the file and folders of the system. In this section, we will be discussing two popular version control systems for Microsoft Dynamics NAV.

Let's take a look at the web services architecture in Dynamics NAV. Microsoft Dynamics NAV 2016 uses two types of web services: SOAP web services and OData web services:

 

ODATA

SOAP

Page

Yes

Yes

Query

Yes

No

Codeunit

No

Yes

The main difference between the two in Microsoft Dynamics NAV is that with SOAP web services, you can publish and reuse business logic, and with OData web services, you can change data to external applications.

In a dataset, you can make certain changes in order to improve the performance of the report. This is not always applicable for all reports; it depends on the nature of the problem, and you should spend time analyzing the problem before fixing it. The following are some of the basic considerations that you should keep in mind when dealing with datasets in NAV reports: 

  • Try to avoid the creation of dataset lines if possible; create variables instead
  • Try to reduce the number of rows and columns
  • Apply filters to the request page
  • For slow reports with higher runtime, use the job queue to generate the report in the server
  • Use text constants for the caption, if needed
  • Try to avoid Include Caption for the column with no need for captions 

Technical upgrade

Technical upgrade is the least used upgrade process, which is when you are making one version upgrade at a time, that is, from Version 2009 to Version 2013 or Version 2013 to Version 2015. So, when you are planning to jump multiple versions at the same time, then technical upgrade might not be the perfect option to choose. It can be efficient when there are minimal changes in the source database objects, that is, fewer customizations. It can also be considered an efficient choice when the business requirement from the product is still the same or has very less significant changes.

Upgrading estimates

In this section, we are going to look at the core components that are responsible for the estimates of the upgrade process. The components that are to be considered while estimating for the upgrade process are as follows:

 

  • Code upgrade
  • Object transformation
  • Data upgrade
  • Testing and implementation

 

Code upgrade

The best method to estimate the code upgrade is to use a file compare tool. It helps us compare the file, folder, version control, conflicts and resolution, automatic intelligent merging, in-place editing of files, track changes, and code analysis.

You can also design your own compare tool if you want, for example, take two version of the same object, take two versions of Customer table. Open them in Notepad and check line by line whether there is any difference in the line, and then get that line value and show it as a log. You can achieve this via C# or any programming language. This should run for each object in two versions of the NAV system and provide you with the statistics of the amount of changes:

overview-important-concepts-microsoft-dynamics-nav-2016-img-0

This can be really handy when it comes to the point of estimation for the code changes. You can also do it manually if the number of objects is less.

It is recommended that one must use the Microsoft Dynamics Sure Step methodology while carrying out any upgrade projects. Dynamics Sure step is a full life cycle methodology tool which is designed to provide a discipline and best practice to upgrade, migrate, configure and deploy Microsoft Dynamics NAV Solution.

Object transformation

We must take a close look in the case of some objects that are not directly upgraded. As, for example, if your source database reports are in the classic version or early RTC version, it might not be feasible to transform them into the latest reports because of the huge technological gap between the reports. In these cases, you must be very careful while estimating for these upgrades. For example, TransHeader and TransFooter and other categorizations that are present in classic reports are hard to map directly into Dynamics NAV 2016 reports. We might have to develop our own logic to achieve these grouping values, which might take some additional time. So, always treat this section as a customization instead of upgrade. Mostly, Microsoft partner vendors keep this section separate and, in most of the cases, separate resources are assigned to do that for parallel work environments.

Reports can also have word layouts that should also be considered during the estimates.

Data upgrade

We perform a number of distinct steps while upgrading data. You must consider the time for each section in the data upgrade process in order to correctly estimate the time for it:

overview-important-concepts-microsoft-dynamics-nav-2016-img-1

The first thing that we do is a trial data upgrade process. This allows us to analyze different aspects, such as, to see how long it takes; if data upgrade process works or not; and will it allow us to test the results of this trial data upgrade. Once we are done with the trial data upgrade, we might need to do it a number of times before it works. Then, we can do a preproduction data upgrade because since the moment we started our analyses and development, the production data might have changed, so we also need to do a preproduction run to also have a closer estimate of the time windows that we have available when we are going to do the real implementation. Acceptance testing is also a very important phase. Once you have done the data upgrade, you need the end users or key users to confirm that our data has been converted correctly. And then you are ready to perform the live data upgrade. So all of these different phases in the data upgrade will also require some time. The amount of time will also depend on the size of the database or the version that you are starting from. So, this gives you an overview of the different pillars that are important to estimate how much time it might take to prepare and analyze the updates project.

Software as a Service

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 image illustrates the SAAS taxonomy. Here you can clearly understand different services like Sales force, NetSuite, QuickBooks which are distributed as SAAS:

overview-important-concepts-microsoft-dynamics-nav-2016-img-2

Software as a Service taxonomy

Understanding the PowerShell cmdlets

We can categorize the PowerShell commands into five major categories of use:

 

  • Commands for Server administrators
  • Command for implementers for company management
  • Commands for administrators for upgrades
  • Commands for administrator for security
  • Commands for developers

 

Commands for server administrators

The first category contains commands that can be used for administrative operations like create, save, remove, get, import, export, set, and the like as given in the following table:

Dismount-NAVTenant

New-NAVServerConfiguration

Export-NAVApplication

New-NAVServerInstance

Get-NAVApplication

New-NAVWebServerInstance

Get-NAVServerConfiguration

Remove-NAVApplication

Get-NAVServerInstance

Remove-NAVServerInstance

Get-NAVServerSession

Remove-NAVServerSession

Get-NAVTenant

Save-NAVTenantConfiguration

Get-NAVWebServerInstance

Set-NAVServerConfiguration

Export-NAVServerLicenseInformation

Set-NAVServerInstance

Import-NAVServerLicense

Set-NAVWebServerInstanceConfiguration

Mount-NAVApplication

Sync-NAVTenant

Mount-NAVTenant

 

We can set up web server instances, change configurations, and create a multitenant environment; we can only use PowerShell for a multitenant environment.

Command for implementers for company management

The second category of commands can be used by implementers, in particular, for operations related to installation and configuration of the system. The following are a few examples of this category of commands:

Copy-NAVCompany

Get-NAVCompany

New-NAVCompany

Remove-NAVCompany

Rename-NAVCompany

Commands for administrators for upgrades

The third category is a special category for administrators, which is related to upgradation of operations.

Get-NAVDataUpgrade

Resume-NAVDataUpgrade

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime

Start-NAVDataUpgrade

Stop-NAVDataUpgrade

The third category of commands can be useful along with the upgrade toolkit.

Commands for administrator for security

This is one of the most important categories, which is related to the backend of the system. The commands in this category grant the power of accessibility and permission to the administrators. I strongly recommend these make-life-easy commands if you are working on security operations. Commands in this category include the following:

Get-NAVServerUser

Remove-NAVServerPermission

Get-NAVServerUserPermissionSet

Remove-NAVServerPermissionSet

New-NAVServerPermission

Remove-NAVServerUser

New-NAVServerPermissionSet

Remove-NAVServerUserPermissionSet

New-NAVServerUser

Set-NAVServerPermission

New-NAVServerUserPermissionSet

Set-NAVServerPermissionSet

 

Set-NAVServerUser

These commands can be used basically to add users, and for permission set.

Commands for developers

The last, but not the least, treasure of commands is dedicated to developers, and is one of my most-used commands. It covers a wide range of commands, and should be included in your daily work life. This set of commands includes the following:

Get-NAVWebService

Join-NAVApplicationObjectFile

Invoke-NAVCodeunit

Join-NAVApplicationObjectLanguageFile

New-NAVWebService

Merge-NAVApplicationObject

Remove-NAVWebService

Remove-NAVApplicationObjectLanguage

Compare-NAVApplicationObject

Set-NAVApplicationObjectProperty

Export-NAVAppliactionObjectLanguage

Split-NAVApplicationApplicationObjectFile

Get-NAVApplicationObjectProperty

Split-NAVApplicationObjectLanguageFile

Import-NAVApplicationObjectLanguage

Test-NAVApplicationObjectLanguage

 

Update-NAVApplicationObject

Microsoft Dynamics NAV 2016 Posting preview

In Microsoft Dynamics NAV 2016, you can review the entries to be created before you post a document or journal.

This is made possible by the introduction of a new feature called Preview Posting, which enables you to preview the impact of a posting against each ledger associated with a document.

In every document and journal that can be posted, you can click on Preview Posting to review the different types of entries that will be created when you post the document or journal.

Workflow

Workflow enables you to understand modern life business processes along with the best practices or industry standard practice. For example, ensuring that a customer credit limit has been independently verified and the requirement of two approvers for a payment process has been met.

Workflow has these three main capabilities:

 

  • Approvals
  • Notifications
  • Automation

 

Workflow basically has three components, that is, Event, Condition, and Response. Event defines the name of any event in the system, whereas On Condition specifies the event, and the Then response is the action that needs to be taken on the basis of that condition. This is shown in the following screenshot:

overview-important-concepts-microsoft-dynamics-nav-2016-img-3

Exception handling

Exception handling is a new concept in Microsoft Dynamics NAV. It was imported from .NET, and is now gaining popularity among the C/AL programmers because of its effective usage.

Like C#, for exception handling, we use the Try function. The Try functions are the new additions to the function library, which enable you to handle errors that occur in the application during runtime. Here we are not dealing with compile time issues. For example, the message Error Returned: Divisible by Zero Error. is always a critical error, and should be handled in order to be avoided. This also stops the system from entering into the unsafe state. Like C sharp and other rich programming languages, the Try functions in C/AL provide easy-to-understand error messages, which can also be dynamic and directly generated by the system. This feature helps us preplan those errors and present better descriptive errors to the users.

You can use the Try functions to catch errors/exceptions that are thrown by Microsoft Dynamics NAV or exceptions that are thrown during the .NET Framework interoperability operations.

The Try function is in many ways similar to the conditional Codeunit.Run function except for following points:

  • The database records that are changed because of the Try function cannot be rolled back
  • The Try function calls do not need to be committed to the database

Visual Basic programming

Visual Basic (VB)is an event-driven programming language. It is also an Integrated development environment (IDE). If you are familiar with BASIC programming language, then it will be easy to understand Visual Basic, since it is derived from BASIC. I will try to provide the basics about this language here, since it is the least discussed topic in the NAV community, but very essential to be understood by all report designers and developers.

Here we do not need to understand each and every detail of the VB programming language, but understanding the syntax and structure will help us understand the code that we are going to use in the RDLC report.

An example code of VB can be written as follows:

Public Function BlankZero(ByVal Value As Decimal)
  if Value = 0 then
    Return ""
  End if
    Return Value
End Function End Sub

This preceding function, BlankZero, basically just returns the value of the parameter. This is simplest function which can be found in the code section of the RDLC report. Unlike C/AL, we do not need to end the code line with a colon (;):

Writing your own Test unit

Writing your own Test unit is very important, not just to test your code but also to give you an eagle's-eye view on how your code is actually interacting with the system. It gives your coding a meaning, and allows others to understand and relate to your development. Writing a unit test involves basically four steps as shown in the following diagram:

overview-important-concepts-microsoft-dynamics-nav-2016-img-4

Certificates

A certificate is nothing but a token that binds an identity to a cryptographic key.

Microsoft Management Console (MMC) is a presentation service for management applications in the Microsoft Windows environment. It is a part of the independent software vendor (ISV) extensible service, that is, it provides a common integrated environment for snap-ins, provided by Microsoft and third-party software vendors.

Certificate authority

A certification authority (CA) is an entity that issues certificates. If all certificates have a common issuer, then the issuer's public key can be distributed out of band:

overview-important-concepts-microsoft-dynamics-nav-2016-img-5

In the preceding diagram, the certificate server is the third party, which has a secure relationship with both the parties that want to communicate. CA is connected to both parties through a secure channel. User B sends a copy of his public key to the CA. Then the CA encrypts public key of User B using a different key. Two files are created because of this trigger: the first is an encrypted package, which is nothing but the certificate, and the second is the digital signature of the certificate server. The certificate server returns the certificate to user B. Now User A asks for certificate from User B. User B sends the copy of its public key to User A. This is again done using a secure communication channel. User A decrypts the certificate using the key obtained from the certificate server, and extracts public key of User B. User A also checks the digital signature of the certificate server to ensure that the certificate is authentic.

Here, whatever data is encrypted using public key of User B, it can only be decrypted using the private key of User B, which is only present with User B and not with any of the intruders over the Internet. So only User B can decrypt and read the content send by User A.

Once the keys are transferred, User A can communicate with User B. In case User B wants to send data to User A, then User B would need public key of User A, which will be again granted by CA.

Certificates are issued to a principal. – The Issuance policy specifies the principals to which the CA will issue certificates.

The certification authority does not need to be online to check the validity of the certificate. It can be present in a server of a locked room. It is only consulted when a principal needs a certificate. Certificates are a way of associating an identity with a public key and distinguished name.

Authentication policy for CA

The authentication policy defines the way principals prove their identities. Each CA has its own requirements constrained by contractual requirements such as with Primary Certification Authority (PCA):

  • PCA issues certificates to CA
  • CA issues certificates to individuals and organizations

All rely on non-electronic proofs of identity, such as biometrics (fingerprints), documents (drivers license or passport), or personal knowledge.

A specific authentication policy can be determined by checking the policy of the CA that signed the certificate.

Kinds of certificates

There are at least four kinds of certificates, which are as follows:

  • Site certificates (for example, www.msdn.microsoft.com).
  • Personal certificates (used if the server wants to authenticate the client). You can install a personal certificate in your browser.
  • Software vendor certificates (used when software is installed). Often, when you run a program, a dialog box appears warning that The publisher could not be verified. Are you sure you want to run this software? This is caused either because the software does not have a software vendor certificate, or because you do not trust the CA who signed the software vendor certificate.
  • Anonymous certificates, (used by a whistle blower to indicate that the same person sent a sequence of messages, but doesn't know who that person is).

Other types of certificates

Certificates can also be based on a principal's association with an organization (such as Microsoft (MSDN)), where the principal lives, or the role played in an organization (such as the comptroller).

Summary

In this article we covered the important concepts in Dynamics Nav 2016 such as version control, dataset considerations, technical upgrade, Software as a Service, certificates, and so on.

Resources for Article:


Further resources on this subject:


Modal Close icon
Modal Close icon