Dynamics NAV 2013 introduces several development changes. There are changes regarding the development environment, with new features and object properties, and changes in the standard C/AL code, which has been redesigned in some areas.
Development Environment is the former Dynamics NAV classic client. In previous versions, the classic client was used both as an application client for end users and for development purposes. With Dynamics NAV 2013, the classic client is no longer available as an application client but has remained as the development environment. That is why it has been renamed to Microsoft Dynamics NAV Development Environment.
The development environment in Dynamics NAV 2013 introduces several improvements, including:
Microsoft Dynamics NAV 2013 introduces a brand new debugger. Debugging will no longer be a painful task in Microsoft Dynamics NAV. Conditional breakpoints, debug other user sessions, and debug C/AL code in the Windows client instead of incomprehensible C# code are the new features, which will convert the debugging experience into a happy experience.
With the new debugger, you can now debug the following sessions:
STARTSESSION
functionYou will find more information about the new debugger in Chapter 11, Debugging.
Page development is easier with Dynamics NAV 2013 than it was with Dynamics NAV 2009. Several enhancements have been added to the Page Designer page, as follows:
Testing options were introduced with Dynamics NAV 2009 SP1. Dynamics NAV 2013 has gone further in testing and introduces the ability to test pages.
On a test codeunit, we can now create a new type of variable, TestPage
.
With this type of variable, we will be able to do with code almost the same things a user can do in a page. We will be able to:
A set of tests that use this new feature is available for Dynamics NAV 2013: Application Test Toolset. With this tool, you will be able to do testing on most of the standard functionalities provided with Dynamics NAV. It is important to run those tests when developing for Dynamics NAV as we want to make sure our developments do not introduce bugs into standard Dynamics NAV functionality.
Application Test Toolset can be downloaded from the following link (requires access to PartnerSource):
A blog post from the Dynamics NAV development team explains how to use the tool and can be found at:
Report development is completely different from what it used to be. The report development experience changed in Dynamics NAV 2009, with the introduction of RLDC-based reports, but it changes again with the actual release of the application.
With Dynamics NAV 2009, RLDC-based reports were introduced, but reports were still compatible with the classic definition of reports in Dynamics NAV. RLDC reports were actually based on the classic definition of the report.
With Dynamics NAV 2013, the classic definition for reports has disappeared and only RLDC-based reports are now available. But RLDC reports cannot now be based on the classic definition of reports. That is why the report development experience has changed again.
The report development experience in Dynamics NAV Development Environment now resembles the development experience of pages, queries, or XMLports. We now include, in the report designer, not only data items but also columns (fields) that will be displayed on the report.
The second part of report development, the development of the layout of the report, has to be done in Visual Studio 2010 (Dynamics NAV 2009 used Visual Studio 2008).
Reports in Dynamics NAV 2013 include a new function, SAVEASWORD
, that enables you to save a report on the computer that is running Dynamics NAV Server as a Microsoft Word (.doc
) document.
Reports in Dynamics NAV 2013 include three new properties to specify the printer tray from which pages of a report are printed. Those properties are as follows:
PaperSourceFirstPage
propertyPaperSourceLastPage
propertyPaperSourceDefaultPage
propertyMicrosoft Dynamics NAV 2013 introduces a new application object, the Query.
A Query
is a read-only object that allows us to combine data from multiple tables into a single dataset using several SQL join types. Results in a query can easily be filtered, sorted, and grouped, and totals can easily be calculated using methods such as sum
, average
, or count
.
You will find more information about this new application object in Chapter 12, The Query Object.
In the previous versions of Dynamics NAV, XMLports could not be executed directly. They had to be run from a codeunit. With Dynamics NAV 2013, we can now run XMLports directly from Object Designer. The XMLport will run on the Dynamics NAV server.
In previous versions, when using XMLports with the Import option, new records could be inserted but existing records could not be modified. XMLports now have a set of new properties, called AutoSave
, AutoReplace
, and AutoUpdate
, to determine whether records are automatically inserted, replaced, or updated.
In the previous versions, XMLports could only import and export data in text format encoded with MS-DOS encoding format. With Dynamics NAV 2013, we can now specify whether to use the MS-DOS, UTF-8, or UTF-16 encoding formats.
When you add new elements to a Dynamics NAV object, such as new global or local variables, new functions and new controls in pages, you are automatically given an ID for that new element that always starts with the same ID.
When developing in Dynamics NAV, we usually identify changes for a specific solution using the object's version list and also using object and field numbering. However, we cannot use element numbering in standard objects to identify developments done for a specific solution. In Dynamics NAV 2013, that is now possible with Start ID Offset.
When we specify a Start ID Offset, for example 1000, all elements that we create will have an ID starting with 1000 and then incremented by 1. That is, the first element created on an object will have 1000 as ID, the second element will have 1001 as ID, and so on.
To specify a Start ID Offset, the following steps have to be performed:
Dynamics NAV 2013 introduces new data types, functions, properties, and triggers. There are also some data types, functions, properties, and triggers that have changed or that have been removed.
The following table provides an overview of all the changed properties and their replacements:
Property |
Type of change |
Description of the change |
---|---|---|
New |
New property in XMLports | |
New |
New property in XMLports | |
New |
New property in XMLports | |
New |
New report property | |
New |
New report property | |
New |
New report property | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
In Microsoft Dynamics NAV 2013, the default transaction isolation level is | |
Removed |
– | |
Removed |
– | |
Removed |
– |
The following table provides an overview of all the changed triggers and their replacements:
Trigger |
Type of change |
Description of the change |
---|---|---|
New |
New XMLport trigger | |
New |
New XMLport trigger | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– |
The following table provides an overview of all the changed data types and their replacements:
Data type |
Type of change |
Description of the change |
---|---|---|
Changed |
If you call the | |
Changed |
The | |
Changed |
| |
Removed |
|
The following table provides an overview of all the changed functions and their replacements:
Function |
Type of change |
Description of the change |
---|---|---|
New |
New function to calculate FlowFields at the same time that you retrieve them from the database | |
New |
New function | |
New |
New function | |
New |
New function | |
Changed |
| |
Changed |
| |
Changed |
| |
Changed |
The | |
|
Changed |
The |
Changed |
Redundant in Microsoft Dynamics NAV 2013 reports. We recommend that you use the | |
Changed |
New functions have been introduced | |
Changed |
You cannot call the | |
Changed |
Microsoft Dynamics NAV 2013 does not let you modify the database by using an old copy of a record. You cannot call the | |
Changed |
You cannot call the | |
Changed |
Microsoft Dynamics NAV 2013 does not let you modify the database by using an old copy of a record. | |
Changed |
Name changed to | |
Changed |
Name changed to | |
Changed |
Obsolete in Microsoft Dynamics NAV 2013, but still supported. This function always returns | |
Changed |
Not used in Microsoft Dynamics NAV 2013. The function is still available and compiles, but always returns | |
Changed |
Not used in Microsoft Dynamics NAV 2013. The function is still available and compiles but because Microsoft Dynamics NAV 2013 uses SQL Server's locking mechanisms and does not use snapshots like earlier versions of Microsoft Dynamics NAV did, the return value is always | |
Changed |
In Microsoft Dynamics NAV 2013, you do not have to define keys only for SIFT indexes. Fewer SIFT indices and fewer Microsoft Dynamics NAV keys can improve performance. | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
Not supported in Microsoft Dynamics NAV 2013. Use the | |
Removed |
– | |
Removed |
Not supported in Microsoft Dynamics NAV 2013. Use the | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
Not supported in Microsoft Dynamics NAV 2013. Instead, you change the | |
Removed |
Not supported in Microsoft Dynamics NAV 2013. Instead, you change the | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– | |
Removed |
– |
The following table provides an overview of all the changed objects and their replacements:
Dynamics NAV can be extended with the .NET Framework assemblies. We can reference assemblies and call types directly from C/AL code of Dynamics NAV objects, such as pages and codeunits. Dynamics NAV objects can also subscribe to events that are published by .NET Framework types.
Control add-ins has been enhanced with the following features:
DateTime
, Boolean
, Char
, Decimal
, Int32
, Int64
, and Guid
. Data binding and firing of the OnControlAddIn
C/AL trigger is enabled by implementing respective interfaces.Standard Dynamics NAV C/AL code has been redesigned in Dynamics NAV 2013 to use some new development functions introduced with this release of the application and to make the application faster.
The sales, purchase, and service posting routines of Dynamics NAV 2013 have been redesigned to lock differently from how previous versions of Dynamics NAV locked.
In previous versions, posting routines used to lock the G/L Entry table at the very beginning of the transaction. That meant that a user could not initiate a posting transaction while another posting transaction was being executed. This was a huge performance issue in multiuser environments.
Dynamics NAV 2013 sales, purchase, and service posting routines have been redesigned to lock the G/L Entry table later on, when the lock is really needed. Thus, the time for which this table remains locked is shorter than in previous versions, letting multiple users execute a posting routine at the same time and thus improving performance in multiuser environments.
With Dynamics NAV 2013, the dimension feature has been redesigned. From the user's point of view nothing has changed; dimensions still work as they used to, and they are used for the same purposes.
But the way dimensions are stored in the database has been completely redesigned. Instead of explicitly storing each dimension value in the database, a dimension set ID is used, and all the tables that use dimensions (documents, journals, entries, and so on) now refer to the same dimension set ID. This way, a dimension set is stored only once in the database, reducing the database space required to store dimensions and improving the application's overall performance. A new table called Dimension Set Entry
has been created. Dimension set IDs are then assigned to journal lines, documents headers, and document lines.
A dimension set is a unique combination of dimension values. It is stored as dimension set entries in the database. Each Dimension Set Entry
table represents a single dimension value. The dimension set is identified by a common dimension set ID that is assigned to each Dimension Set Entry
table that belongs to the dimension set.
Dimension sets are stored in the Dimension Set Entry
table as dimension set entries with the same dimension set ID.
When you create a new journal line, document header, or document line, you can specify a combination of dimension values. Instead of explicitly storing each dimension value in the database, a dimension set ID is assigned to the journal line, document header, or document line to specify the dimension set.
When you edit and close the Edit Dimension Set Entries window, a check is performed to see whether the combination of dimension values exists as a dimension set in the table. If the combination occurs in the table, the corresponding dimension set ID is assigned to the journal line, document header, or document line. Otherwise, a new dimension set is added to the table, and the new dimension set ID is assigned to the journal line, document header, or document line.