Series of improvements/enhanchements for Dynamics NAV 2016

During my preparation for Directions sessions I studied the new enhanced Data Exchange Framework in NAV 2016.  I have done a number of things to enhance the functionality and to enable functionality that should be available according to the possible setup.

Over the next coming weeks I plan to publish these things and hope that they will be useful for some of you.  How knows, Microsoft might even decide that some of these fixes and features should be included in the standard product.

The first thing I want to suggest is regarding the functionality of getting the XML structure of a file into the Data Exchange Framework.  Going into the definition for Yahoo Currency Exchange Rate Services and try the “Get File Structure” function.

DataExchangeGetStructure

Then next page will allow you to enter a URL to the XML file.

xmlpath

The problem we face here is that the Path must be accessible by the NAV Service Tier.  So, what to do if you have the XML file on your desktop?

Utilizing the new TryFunction method.  I decided to add the new function to the File Management Codeunit (419).

getanypath

Throw any path; local path, server path, url to the MakeServerTempFile function and you will receive a Server File Name that is accessible by the Service Tier.  This function will

  1. If path if found on the server, return that path
  2. If path is found on the windows client computer, upload the file to the server
  3. Try to download the file with web client to the server
  4. Ask the user to upload the file

Add this function to Codeunits 1235 and 1237 to make sure that the Get XML Structure works as expected.

getxml

getjson

2 Replies to “Series of improvements/enhanchements for Dynamics NAV 2016”

  1. Not exactly the topic, but another improvement would be to be able to give a default value to an option field in the Data Exchange framework. Eg. I’d like to give the field “Fix Exchange Rate Amount” the value “Relation Currency” (instead of default option 0, ie. Currency).

  2. Very useful. Thank you. I’m currently working on using the data exchange framework for a project and hitting a few limitations so would be really useful to know what else you have hit and addressed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.