Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Data Exchange Definitions - Import/Export

(1) ShareShare
ReportReport
Posted on by

Hi,

I am currently reviewing the idea of using Data Exchange Definitions to import and export documents types e.g. Sales Orders from/to CSV - I believe the normal way is Dataports/XMLport. However, I am wondering if the Data Exchange framework can be used instead. The reason I ask is that it is more transparent through the user interface where columns and changes to mappings can be done in the application rather than the DEV environment.

I have had a look into it and can king of see how to create a sales order import using type "Generic Import" and a mixture of code units to process the mapping etc. However, there doesn't appear to be a suitable type for exporting (only available are "Payment Export" and "Positive Pay Export") - should there be a "Generic Export" type that I could use?

Any help or guidance much appreciated.

Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Data Exchange Definitions - Import/Export

    Hey guys,

    I have a txt file, which looks like this:

    12345-19-08-26,111111,222222,333333

    My goal is to import this file via the Data Exchange framework.

    For that  I have adjusted the Codeunit "Fixed File Format" to import also delimited files.

    Now, I want to do some post.processing, because there is already data, but with the txt files they should be updated.

    I found in Codeunit "Process Data Exch." a function "Process Column Mapping" and that function I would like to extend that one with my logic.

    Do you know, how to do this?

    Maybe I start like this?!

    pastedimage1567417189823v1.png

    Thank you :)

  • Suggested answer
    keoma Profile Picture
    32,717 on at
  • Community Member Profile Picture
    on at
    RE: Data Exchange Definitions - Import/Export

    it does do import of sales orders (e.g. PEPPOL) and has generic import type to chose but no generic export type which is why I am asking if anyone has tried because only other option is xml/dataports

  • keoma Profile Picture
    32,717 on at
    RE: Data Exchange Definitions - Import/Export

    you're right, that's a NAVDACH localisation.

    according Data Exchange Definitions´Framework:

    It is possible to set it up for usage with e.g. Sales Orders (it's a bit tricky). But it seems that it's meant for import/export bank data only. it's needed to add the new definition to the bank import/export setup and apply it then to a bank. then it's useable e.g. in the payment reconciliation journal to import bank transactions.

    using the framework in other areas would be a customization. technically the framework uses xmlports to generate the export data or to import data.

    so your best chance are the rapid start services.

  • Community Member Profile Picture
    on at
    RE: Data Exchange Definitions - Import/Export

    there is no data export option in my version. I believe you are referring to a German localisation - see walkthrough of that functionality in the German localisation

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

    My questions regarding a sales order export are still valid because the link you posted does not mention there is no suitable type i.e. no General Export available.

    Thanks for your efforts

    Paul

  • keoma Profile Picture
    32,717 on at
    RE: Data Exchange Definitions - Import/Export

    as i suggested, you can use the "data exports" from the financial module to export data as csv file without any coding. for that goto /Departments/Administration/Application Setup/Financial Management/General/Data Exports in the windows client.

    in my example the dtd file does not really matter. but it's needed that you set one. otherwise you cannot export data.

    you can also use a very simple dtd file here.

    create e.g. a new text file with name simple.dtd and add only one line:

    <?xml version="1.0" encoding="UTF-8"?>

    then save that file and apply it to the data export record definition, in my case S-ORDER.

    then run action "Export" from menu "Process".

    A list of the (filtered) sales orders is then exported to text file SalesHeader.txt (and SalesLine.txt, if you also defined Sales Lines to export).

    for usage of the Data Exchange Definitions follow

    msdn.microsoft.com/.../dn495312(v=nav.90).aspx

  • Community Member Profile Picture
    on at
    RE: Data Exchange Definitions - Import/Export

    Thank you for responding but I am not sure if I understand your reply. I am specifically talking about using the Data Exchange Definition framework to import export sales orders. I actually think the GDPdu Data Export could be a German localisation???

  • Suggested answer
    keoma Profile Picture
    32,717 on at
    RE: Data Exchange Definitions - Import/Export

    to use the Data Exchange Definition framework some configuration is needed. details you'll find on msdn.

    a more simple way to export data to a CSV file is the usage of the "data exports" from the financial module. also no coding needed.

    to use it you'll need a (simple) dtd file. for that follow

    msdn.microsoft.com/.../hh934654(v=nav.80).aspx

    blogs.msdn.microsoft.com/.../gdpdu-dtd-datei

    you can use that dtd file or any other dtd file. in that case does not matter.

    to export e.g. sales orders do the following:

    - goto "data exports" in the windows client

    - view record definitions

    - add new rec. def. S-ORDER: set description, export path, add dtd file (Import in Menu DTD File)

    - view reccord source

    - add table no. 36, period field no. 99, set table filter to document type=ORDER

    - add fields document type, no. to the field list. they are the primary key and must be the first fields.

    - add additional fields you want to export

    - click validate to check

    - optional: add new header record table no.=37 (sales line), add indent, add relationship

    - close page

    - select S-ORDER record, click Export in Process Menu

    - set the needed filter values in the request page, click ok to run the export

    - goto export folder, check export file SalesHeader.txt (and optional SalesLine.txt)

    it's a nice option to export data. this example shows that it's also usable for sales/purchase data to export.

  • Community Member Profile Picture
    on at
    RE: Data Exchange Definitions - Import/Export

    Thankyou for your response and yes I would be very happy to see the details of your work. However, the link you added mentions generic imports and exports but the types available don't seem to fit generic exports:

    Type "Specify what type of business activity the data exchange definition is used for, such as Payment Export."

    Basically what type would I pick for a Sales Order export? Only Payment Export and Positive Pay Export available which neither is suitable for a Sales Order export.

    Again thanks for the response and I will keep watching this post.

  • Suggested answer
    Ashwini Tripathi Profile Picture
    4,624 on at
    RE: Data Exchange Definitions - Import/Export

    How to do is explained in this link :- msdn.microsoft.com/.../dn495312(v=nav.90).aspx

    But specifically what you are looking for have created interest in me to go ahead with.

    In past i have made such generic export program for one of my client where i used setup and have written code to Export data using RecRef and ColumnRef and i am sure this can also be done as it provides setup i have to just tweak my code to refer to this setup.

    If you don't get your answer by when i am done will share details with you.

    You can find it on my Blog verysoon.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,923 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,788 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans