Development changes

Dynamics NAV 2016 has introduced some development changes. These are the changes regarding the development environment with new ways to develop document type reports and changes in the standard C/AL code, which has been redesigned in some areas.

Document reporting

When Microsoft introduced Report Definition Language Client-side (RDLC) as its main report-writing tool, a lot of NAV developers cried foul. Why? Because programming NAV reports using RDLC was like pulling teeth! Add to the complexity of creating an actual report, what you get when you preview a report is often times not what gets printed out on PDF or paper. This is especially true when creating document type reports such as a sales order or sales invoice.

With the horrendous feedback for the development for RDLC reports, Microsoft got to work and released a tool to develop document type reports using Word for layout. This means you can use the pre-made templates for invoices using Word.

There are four pre-made reports with Word document layouts in NAV 2016. They are as follows:

  • 1304 - Mini Sales – Quote
  • 1305 - Mini Sales - Order Conf.
  • 1306 - Mini Sales – Invoice
  • 1307 - Mini Sales - Credit Memo

These reports can only be accessed using the SMALL BUSINESS role center.

To see and configure the Word Layout designer, let's perform the following steps:

  1. First, start the Development Environment for NAV 2016. Find report 1305 and click on Design:
    Document reporting
  2. Next, navigate to Tools | Word Layout | Export.
    Document reporting
  3. Next, navigate to Tools | Word Layout | Export. The following screenshot shows the Edit – Report Layout Selection window:
    Document reporting
  4. From here, NAV will prompt you for a place to save the Word layout. Open the Word document and apply any preformatted templates from Word.
  5. When you're done with editing the layout, import it back to the NAV 2016 Development Environment, go into the designer mode for report 1305, then navigate to Tools | Word Layout | Import.

    Please note that you're allowed to keep the RDLC layout or the Word layout. However, you will need to tell Dynamics NAV which layout to use. This can be controlled by going to Report Layout Selection.

Document reporting

Note

For a step-by-step tutorial on how to edit the Word Layout for NAV 2016, please visit the following link:

https://msdn.microsoft.com/en-us/library/dn789519(v=nav.90).aspx

Upgrade automation – an overview

Upgrading your Dynamics NAV basically consists of three main parts:

  • Convert the database to the new version
  • Upgrade the application code to the new version
  • Upgrade the data to the new version

Of the three processes, upgrading the application code and the data takes up the most time. This can cause companies to shy away from upgrading to the latest version of Dynamics NAV.

Upgrade automation – the application code

The first problem with upgrade is upgrading the application code. Prior to NAV 2016, to upgrade the application code, you had to export the objects of the previous version and the next version into text files. Then you would use any off-the-shelf software or freeware to merge the modifications done on the older version to the new version.

To remedy this, Microsoft introduced a PowerShell script called Merge-NAVApplicationObject. When you run this command using PowerShell, it will automatically merge the code for you. If the process detects a conflict or a problem that it cannot resolve on its own, it will place the conflicts into a separate area for you to resolve it manually.

What used to take hundreds of hours for a version upgrade can now be done in a fraction of the time!

Note

To learn more about upgrading the application code using PowerShell, please visit: https://msdn.microsoft.com/en-us/library/dn271652(v=nav.90).aspx

Upgrade automation – data

The second time-consuming portion of the upgrade is upgrading the data. Initially, after you're done with modifying the application, you had to run an upgrade toolkit that converted the data from the prior version to the new version. Depending on the size of the database file, the processes would take hours, even days per company!

To remedy this problem, Microsoft included four PowerShell commands (called cmdlets) in Dynamics NAV 2016 Administration Shell:

  • Start-NAVDataUpgrade: This starts the process of the data upgrade.
  • Stop-NAVDataUpgrade: This stops the upgrade process that's currently running.
  • Resume-NAVDataUpgrade: This resumes the upgrade process that was stopped.
  • Get-NAVDataUpgrade: This gets the status of the upgrade that's currently running.

With these new commands and PowerShell, you can complete the upgrade of data in a fraction of the time that it used to take.

Note

To learn more about upgrading data through the Administration Shell, please visit:

https://msdn.microsoft.com/en-us/library/dn762348(v=nav.90).aspx

Enhancement in security and encryption

Microsoft's strategy to move from desktop computing to cloud computing is no secret. The release of Office 365 reinforces their cloud- and subscription-based strategy.

Microsoft introduced OAuth Authentication for OData and SOAP endpoints. This allows for more secure connections between custom apps, Dynamics NAV, and Office 365.

Changes to C/AL functions, data types, properties, and triggers

Dynamics NAV 2016 has introduced new functions, properties, and triggers. There are also some data types, functions, properties, and triggers that have changed or 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

AutoFormatType

New

Includes the setting that enables you to create a custom format to add characters before and after a data value

AutoReplace

New

New property in XMLports

AutoSave

New

New property in XMLports

AutoUpdate

New

New property in XMLports

FunctionType Property (Upgrade Codeunits)

New

Used for automated upgrades described previously

PaperSourceDefaultPage

New

New report property

PaperSourceFirstPage

New

New report property

PaperSourceLastPage

New

New report property

DrillDownFormID

Changed

Name changed to DrillDownPageID

CardFormID

Changed

Name changed to CardPageID

LookupFormID

Changed

Name changed to LookupPageID

RunFormLink

Changed

Name changed to RunPageLink

RunFormOnRec

Changed

Name changed to RunPageOnRec

RunFormView

Changed

Name changed to RunPageView

SubFormLink

Changed

Name changed to SubPageLink

SubFormView

Changed

Name changed to SubPageView

UseReqForm

Changed

Name changed to UseRequestPage

TransactionType

Changed

In Microsoft Dynamics NAV 2013, the default transaction isolation level is REPEATABLE READ. In the earlier versions of Microsoft Dynamics NAV, it was SERIALIZABLE. This affects the FIND and NEXT function calls when the transaction type is Update, Snapshot, or UpdateNoLocks.

BottomMargin

Removed

PaperSourceOtherPages

Removed

SaveTableView

Removed

The following table provides an overview of all the changed triggers and their replacements:

Trigger

Type of change

Description of the change

OnAfterModifyRecord

New

New XMLport trigger

OnBeforeModifyRecord

New

New XMLport trigger

OnCreateHyperlink

Removed

OnHyperlink

Removed

OnPreSection

Removed

OnPostSection

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

BLOB

Changed

If you call the CALCFIELDS function (Record) on a BLOB field, you will get the value of BLOB, that is, in the database, and not the value that you wrote to BLOB OutStream.

Code

Changed

The Code data type supports Unicode. Limits are not enforced on the length of a Code variable.

Text

Changed

Text supports Unicode in Microsoft Dynamics NAV 2013. Limits are not enforced on the length of a Text variable. You can specify a maximum length in the C/AL Globals or C/AL Locals window when you create a variable, but it is not required.

Binary

Removed

Binary was used to store fixed lengths of binary data in a record. BLOB should now be used for this purpose.

The following table provides an overview of all the changed functions and their replacements:

Function

Type of change

Description of the change

SETAUTOCALCFIELDS(Record)

New

New function to calculate FlowFields at the same time that you retrieve them from the database

CURRENTEXECUTIONMODE

New

New function

STARTSESSION

New

New function

STOPSESSION

New

New function

CALCFIELDS (Record)

Changed

The CALCFIELDS execution is decoupled from the Microsoft Dynamics NAV SIFT index definitions

CALCSUM (FieldRef)

Changed

The CALCFIELDS execution is decoupled from the Microsoft Dynamics NAV SIFT index definitions

CALCSUMS (Record)

Changed

The CALCFIELDS execution is decoupled from the Microsoft Dynamics NAV SIFT index definitions

COUNT (Record)

Changed

The COUNT function does not always ignore security filters. It adheres to the SecurityFiltering property.

COUNT (RecordRef)

Changed

The COUNT function does not always ignore security filters. It adheres to the SecurityFiltering property.

CREATETOTALS

Changed

Redundant in Microsoft Dynamics NAV 2013 reports. We recommend that you use the SUM function in Visual Studio instead.

Debugger functions

Changed

New functions have been introduced

INSERT (Record) and INSERT (RecordRef)

Changed

You cannot call the INSERT function on a record for table 2000000001, the object table, or table 2000000006, the company table

MODIFY (Record) and MODIFY (RecordRef)

Changed

Microsoft Dynamics NAV 2013 does not let you modify the database by using an old copy of a record. You cannot call the MODIFY function on a record for table 2000000001, the object table, or table 2000000006, the company table.

DELETE (Record) and DELETE(RecordRef)

Changed

You cannot call the DELETE function on a record for table 2000000001, the object table, or table 2000000006, the company table.

RENAME

Changed

Microsoft Dynamics NAV 2013 does not let you modify the database by using an old copy of a record.

FormHandler

Changed

Name changed to PageHandler

ModalFormHandler

Changed

Name changed to ModalPageHandler

ISSERVICETIER

Changed

Obsolete in Microsoft Dynamics NAV 2013, but still supported. This function always returns true.

RECORDLEVELLOCKING (Record and RecordRef)

Changed

Not used in Microsoft Dynamics NAV 2013. The function is still available and compiles, but always returns true.

READCONSISTENCY (Record and RecordRef)

Changed

Not used in Microsoft Dynamics NAV 2013. The function is still available and compiles. Because Microsoft Dynamics NAV 2013 uses SQL Server's locking mechanisms and does not use snapshots like the earlier versions of Microsoft Dynamics NAV did, the return value is always false.

SETCURRENTKEY (Record)

Changed

In Microsoft Dynamics NAV 2013, you do not have to define keys only for the SIFT indexes. Fewer SIFT indices and fewer Microsoft Dynamics NAV keys can improve performance.

BEEP

Removed

COMMANDLINE

Removed

COUNTAPPROX

Removed

ENVIRON

Removed

EXPORT (BLOB)

Removed

EXPORTOBJECTS

Removed

Not supported in Microsoft Dynamics NAV 2013. Use the finsql.exe executable with the ExportObjects command instead.

IMPORT (BLOB)

Removed

IMPORTOBJECTS

Removed

Not supported in Microsoft Dynamics NAV 2013. Use the finsql.exe executable with the ImportObjects command instead.

LANGUAGE

Removed

NEWPAGE

Removed

NEWPAGEPERRECORD

Removed

OBJECTID

Removed

OSVERSION

Removed

PAGENO

Removed

PAPERSOURCE

Removed

SAVEASHTML

Removed

SAVEASXML

Removed

SETPERMISSIONFILTER (Record)

Removed

Not supported in Microsoft Dynamics NAV 2013. Instead, you change the SecurityFiltering property from Validated to Filtered.

SETPERMISSIONFILTER (RecordRef)

Removed

Not supported in Microsoft Dynamics NAV 2013. Instead, you change the SecurityFiltering property from Validated to Filtered.

SHELL

Removed

SHOWOUTPUT

Removed

SYNCHRONIZEALLLOGINS

Removed

SYNCHRONIZESINGLELOGIN

Removed

TOTALSCAUSEDBY

Removed

URL

Removed

VARIABLEACTIVE

Removed

YIELD

Removed

The following table provides an overview of all the changed objects and their replacements:

Objects

Type of change

Description of the change

The Query object

New

New object type

Test Pages

New

New objects and functions

Dataports

Removed

Forms

Removed

The RequestOptionsForm system variable

Removed

.NET interoperability

Dynamics NAV can be extended with the .NET Framework assemblies. We can reference assemblies and call types directly from the C/AL code of Dynamics NAV objects, such as pages and codeunits. Dynamics NAV objects can also subscribe to events that are published by the .NET Framework types.

Enhancements in RoleTailored client control add-ins

Control add-ins have been enhanced with the following features:

  • Additional data types are supported with database binding: Dynamics NAV 2016 now supports data types, such as DateTime, Boolean, Char, Decimal, Int32, Int64, and Guid. Data binding and firing of the OnControlAddIn C/AL trigger is enabled by implementing respective interfaces.
  • Methods and properties can be exposed to C/AL code: To extend user interface controls on a page, methods and properties can be exposed in a control add-in assembly so that they can be called by the C/AL code on page triggers.
  • Control add-ins can be sized: We can now specify an area of a page that a control add-in occupies, both with a fixed size or by setting the control add-in to resize as the page window resizes in the Dynamics NAV Windows client.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.168.16