Corfu Navision 2016, Development Tips, How To, XMLports

Multiple namespace support in XML Ports – Microsoft Dynamics NAV 2016

Microsoft Dynamics NAV 2016 now enables developers to create XMLPorts which contain more than one namespace. Namespaces are used to distinguish fields and provide uniqueness.

The inclusion of namespaces enables parties to tag elements and resolve any ambiguity.

What is default Namespace?

This property specifies the default namespace for both import and export. The default value is unique for different XMLports.

For example, the following string specifies a namespace: urn:microsoft-dynamics-nav/xmlports/x100, where 100 is the ID of the XMLport.

What is Namespace?

You can use this property to declare one or more namespaces on the XMLport.

To add a namespace, you can choose the AssistEdit button or enter the namespaces directly in the field.

A namespace declaration consists of prefix and the namespace name, which has the format prefix=namespace. Separate multiple namespaces with a comma.

In the XML documents exported or imported by the XMLport, the namespaces declarations are only supported in the <root> element.

For example, if an XMLport has the namespace mynavprefix=mynavnamepace and the default namespace urn:nav:schema:all, then the root element will be as follows:

<Root xmlns:mynavprefix=”mynavnamespace” xmlns=”urn:nav:schema:all”>

To specify a default namespace, leave the Prefix field blank.

You can also specify the default namespace by specifying the namespace in the DefaultNamespace Property and setting the UseDefaultNamespace Property to Yes.

However, there can only be one default namespace. So if you want to specify a default namespace in the Namespace property, you must set the UseDefaultNamespace Property to No.

How to Define Namespace:
Namespace-1

Using Namespace:
Namespace-2

The final XMLport will be as below:
Namespace-3

Now save your XMLport and execute it.
Namespace-4

The output will be similar to below:
Namespace-5

Conclusion:

  • Multiple namespaces are defined in the root element of the XMLport and have their own property editor for defining them.
  • Developers can easily select the namespace via lookups on the element record.
  • XMLports are accessible both for developers and super users. Including the namespace prefix in the core editor lets you see key data while developing.

I will come up with more information in my upcoming posts.

Advertisement
Development Tips

Page Properties Not Supported by Microsoft Dynamics NAV Web Client

Most page properties that are supported in the Microsoft Dynamics NAV Windows client are also supported in the Microsoft Dynamics NAV Web client.

There are some properties that are not supported by Microsoft Dynamics NAV Web client and other properties that are either partially supported or behave differently in the Microsoft Dynamics NAV Windows client.

Unsupported Properties

The properties that are not supported by the Microsoft Dynamics NAV Web client. When a page that contains an unsupported property is displayed in a browser, the property is ignored. You do not receive an error but the property does not affect the page.

  • ChartPartID Property
  • ColumnSpan Property
  • ControlAddin Property
  • FreezeColumnID Property
  • RowSpan Property
  • RefreshOnActivate Property
  • ShowAsTree Property
  • Style Property
  • StyleExpr Property
  • SystemPartID Property

Partially Supported Properties

The properties that either do not have all the capabilities in the Microsoft Dynamics NAV Web client as they do in Microsoft Dynamics NAV Windows client or they behave differently than in the Microsoft Dynamics NAV Windows client.

  • AssistEdit Property
  • DrillDown Property
  • DrillDownPageID Property
  • GroupType Property
  • Importance Property
  • IndentationControls Property
  • PageType Property
  • PartType Property
Development Tips

Functions Not Supported by Microsoft Dynamics NAV Web Client

Below is the lists the C/AL functions and data types that are not supported or partially supported by Microsoft Dynamics NAV Web client.

Unsupported Functions

Functions that are not supported by the Microsoft Dynamics NAV Web client. If you use a function that is not supported, an error occurs at runtime.

  • CREATE Function (Automation)
  • ISCLEAR Function (Automation)
  • ACTIVATE Function (Debugger)
  • UPDATE Function (Dialog)

Partially Supported Functions

Functions that either do not have all the capabilities in the Microsoft Dynamics NAV Web client as they do in the Microsoft Dynamics NAV Windows client or they behave differently than in the Microsoft Dynamics NAV Windows client.

  • DOWNLOAD Function (File)
  • DOWNLOADFROMSTREAM Function (File)
  • HYPERLINK Function
  • PREVIEW Function (Report)
  • PRINTONLYIFDETAIL Function (Report)
  • REPORT.RUN Function
  • REPORT.RUNMODAL Function
  • UPLOAD Function (File)
  • UPLOADINTOSTREAM Function (File)
Development Tips

Not supported in Microsoft Dynamics NAV 2015

The following table provides an overview of the removed C/AL data types, functions, properties, and triggers in Microsoft Dynamics NAV 2015 since the previous version of Microsoft Dynamics NAV.

Data type, function, property, or trigger Not supported in Microsoft Dynamics NAV 2015  
BEEP Function Not supported on Microsoft Dynamics NAV Server.
Binary Data Type The Binary data type, used in earlier versions of Microsoft Dynamics NAV to store fixed lengths of binary data in a record, is not supported in Microsoft Dynamics NAV 2015. If you previously used the BINARY data type, consider using the BLOB Data Type instead.
BottomMargin Property Not supported in Microsoft Dynamics NAV 2015 reports.
COMMANDLINE Function Not supported in Microsoft Dynamics NAV 2015.
COUNTAPPROX Function Not supported in Microsoft Dynamics NAV 2015.
CREATETOTALS Function Redundant in Microsoft Dynamics NAV 2015 reports. We recommend that you use the SUM function in Visual Studio instead.
Dataports Not supported in Microsoft Dynamics NAV 2015. Use XMLports instead.
ENVIRON Function Not supported in Microsoft Dynamics NAV 2015.
EXPORT Function (BLOB) Not supported in Microsoft Dynamics NAV 2015.
EXPORTOBJECTS Function Not supported in Microsoft Dynamics NAV 2015. Use the finsql.exe executable with the ExportObjects command instead.
Forms Not supported in Microsoft Dynamics NAV 2015.
IMPORT Function (BLOB) Not supported in Microsoft Dynamics NAV 2015.
IMPORTOBJECTS Function Not supported in Microsoft Dynamics NAV 2015. Use the finsql.exe executable with the ImportObjects command instead.
ISSERVICETIER Function Obsolete in Microsoft Dynamics NAV 2015, but still supported. This function always returns true.
KeyGroups Property Not supported in Microsoft Dynamics NAV 2015.

Optionally, you can build indexes in SQL Server management tools.

LANGUAGE function Not supported in Microsoft Dynamics NAV 2015.
NEWPAGE Function Not supported in Microsoft Dynamics NAV 2015 reports.
NEWPAGEPERRECORD Function Not supported in Microsoft Dynamics NAV 2015 reports.
OBJECTID Function Not supported in Microsoft Dynamics NAV 2015 reports.
OnCreateHyperlink Trigger Not supported in Microsoft Dynamics NAV 2015 reports.
OnHyperlink Trigger Not supported in Microsoft Dynamics NAV 2015 reports.
OnPreSection Trigger Not supported in Microsoft Dynamics NAV 2015 reports.
OnPostSection Trigger Not supported in Microsoft Dynamics NAV 2015 reports.
OSVERSION Function Not supported in Microsoft Dynamics NAV 2015.
PAGENO Function Not supported in Microsoft Dynamics NAV 2015 reports.
PAPERSOURCE Function Not supported in Microsoft Dynamics NAV 2015 reports.
PaperSourceOtherPages Property Not supported on Microsoft Dynamics NAV 2015 reports.
RECORDLEVELLOCKING Function (Record and RecordRef) Not used in Microsoft Dynamics NAV 2015. The function is still available and compiles but always returns true.
READCONSISTENCY Function (Record and RecordRef) Not used in Microsoft Dynamics NAV 2015. The function is still available and compiles but because Microsoft Dynamics NAV 2015 uses SQL Server’s locking mechanisms and does not use snapshots like earlier versions of Microsoft Dynamics NAV, the return value is always false.
RequestOptionsForm system variable Not supported in Microsoft Dynamics NAV 2015.
SAVEASHTML Function Not supported in Microsoft Dynamics NAV 2015 reports.
SAVEASXML Not supported in Microsoft Dynamics NAV 2015 reports.
SETPERMISSIONFILTER Function (Record) Not supported in Microsoft Dynamics NAV 2015. Instead, you change the SecurityFiltering Property from Validated to Filtered.
SETPERMISSIONFILTER Function (RecordRef) Not supported in Microsoft Dynamics NAV 2015. Instead, you change the SecurityFiltering Property from Validated to Filtered.
SaveTableView property Not supported in Microsoft Dynamics NAV 2015.
SHELL Function Not supported in Microsoft Dynamics NAV 2015.
SHOWOUTPUT Function Not supported in Microsoft Dynamics NAV 2015 reports.
SYNCHRONIZEALLLOGINS Function Not supported in Microsoft Dynamics NAV 2015.
SYNCHRONIZESINGLELOGIN Function Not supported in Microsoft Dynamics NAV 2015
TOTALSCAUSEDBY Function Not supported in Microsoft Dynamics NAV 2015 reports.
URL Function Not supported on Microsoft Dynamics NAV 2015 reports.
VARIABLEACTIVE Function Not supported in Microsoft Dynamics NAV 2015.
VISIBLE Function Not supported in Microsoft Dynamics NAV 2015.
YIELD Function Not supported on Microsoft Dynamics NAV Server.
Report

How many types of Layout is supported in NAV 2015?

In new Microsoft Dynamics NAV 2015, we are introduced in new reporting feature – Word Layout. It means, that now we can use both of layouts, RDLC and Word. Microsoft Dynamics NAV 2015 includes 4 built-in report layouts that are used on reports by default. These are only “mini” sales reports: Sales – Quote (1304), Sales – Confirmation (1305), Sales – Invoice (1306) and Sales – Credit Memo (1307).

By default, all of these reports are configured as ‘RDLC (built-in)’, but we can change it on Report Layout Selection.
ReportLayoutSelection-1
We can also customize these reports using ‘Custom Layouts’ command. But, what if we need more documents report in Word Layout, for example some of purchase documents. The biggest benefit of this feature is that you can give your customers to prepare own documents and don’t spend your time (and their money) on this job. Because of that, we need to be able to create Word Layout for new documents.
ReportLayoutSelection-2