web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

NAV 2015 - XML Port

(0) ShareShare
ReportReport
Posted on by

Hi all,

I am currently looking into upgrading the BI cube to work with NAV2015.

Instead of using SSIS to get the data into the cube I am thinking of exploring the possibilities of using XMLPort instead. The aim here is to output the flat files in a directory which then will be picked up by SSIS. Currently SSIS and Stored Procedures are used to extract the data which is a pretty complicated process.

Apologies if my questions are a bit random but I am just trying to get all my thoughts together in one post and determine if what I am trying to achieve is possible.

I've managed to output a tab delimited customer table however ran into some obstacles.

1) I would need custom headers. I can't seem to find a guide on how to get this done

2) How do I output customer by company? Currently it seems to only output customers of one company? I have 2 companies, Chronus and Test Company but it’s only outputting customers from the Test Company

3) I would need to match output table so will have to create some “filler” columns. Will this be possible with XML Port?

4) Dynamic file names – is this possible? The dynamic part would be the date and time

Most of the output files for BI are from single tables (Item, Customer) but might require some linked fields. Not sure how to achieve this with XML port at the moment as the tutorials I’ve found are quite basic.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    keoma Profile Picture
    32,729 on at
    RE: NAV 2015 - XML Port

    best you follow

    msdn.microsoft.com/.../hh166529(v=nav.70).aspx

    msdn.microsoft.com/.../hh166380(v=nav.70).aspx

    www.mibuso.com/.../viewtopic.php;t=64746&view=previous

  • Community Member Profile Picture
    on at
    RE: NAV 2015 - XML Port

    Thanks that did it :) Just need to find out how to output to directory currently there is a prompt that asks what I want to do with the file.

  • Verified answer
    aavio Profile Picture
    895 on at
    RE: NAV 2015 - XML Port

    you can use currXMLport.FILENAME function to set the name as you wish.

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

  • Community Member Profile Picture
    on at
    RE: NAV 2015 - XML Port

    EDIT: I've figured out how to add the headers (via a table with 1 record and then define the headers as text fields)

    I would now like to know how do I create the codeunit which enables me to set the filename automatically as above please.

    The idea is to run this XML port via job queue and the file will be automatically output to a directory.

  • Community Member Profile Picture
    on at
    RE: NAV 2015 - XML Port

    Hi! Thanks for the quick reply. I'm finally getting somewhere but have further questions:

    ad 1: I've managed to output the caption but perhaps I didn't explained it well enough. I would need this to go across (column headers) and with this method it outputs the header a row data. Hopefully this makes sense. So output will be something like:

    No.    Name    Address     FillerHeader

    ABC123     Chronus     123 Avenue     FillerData

    DLK333     Pen Ltd    55 Lane     FillerData

    ad 2: Thanks. this clears things up.

    ad 3: Thanks. I guess I also need to be able to output header row as per question in ad 1

    ad 4: Thanks again. Request page option is neat but this has to be automated. The filename would always be in this format : COMPANYCODE+CUSTOMTEXT+DATE+UNDERSCORED+TIME

    Company code is the "Name" field in "Company" table

    e.g ABC123TBLCUSTOMER20151002_1530.txt

    Can you please explain how do I do this via codeunit?

    Thanks so much again. This really gave me a great footing to get started.

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: NAV 2015 - XML Port

    ad 1: analyze xmlport 5050 Export Contact

    e.g.: ContNoTitle := Contact.FIELDCAPTION("No.");

    ad 2: data is shown by company. change the company in the windows client und you'll see only data according the new company. means also for exporting data.

    ad 3: simple add a new line between 2 field lines: node name=dummy, node type=element, source type=text

    ad 4: let xmlport property FileName empty/undefined. edit request page of xmlport, add a new line with source FileName, FileName is a new global var. of type text. you can also run the xmlport out of a codeunit setting the filename via property.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans