How to add all fields of a table in to XML port ?

FiammenghiFiammenghi Member Posts: 17
Hi,
up to now we used Nav 2009 , 2 tier, and we had dataport.
Now we are migrating to Nav2017, dataport are no more there, but we have xmlport.

On 2009 and dataport, you could choose a table, open the field list, select all fields, and you were able to add in one shot all fields of a table as dataport fields.

On 2017 and xml port, as far as i noticed you have to add all fields of a table one by one.
As i have to migrate more than 300 tables data from 2009 to nav 2017, i was wondering if there is a way to create "automatically" a xmlport that add all fields of a table. Someone showed me Rapid starts, but i find them very time comsuming.

I was considering also to write a program in C# that create the XMLPORT in .txt file and then import the object and compile it. but i have a problem,

Look at this simple xml port, what are the highlighted values ?
In case i create a program that build the dataport as a text file, how should i create the highlighet value ?

Any other suggestions ?

Manythanks in advance
Fabrizio





Answers

  • vaprogvaprog Member Posts: 1,139
    They are GUIDs (Globaly Unique IDentifier). Just use the library function to generate a random one.
  • FiammenghiFiammenghi Member Posts: 17
    Many thanks for your prompt reply

    Fabrizio
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Hi

    1. Create a small codeunit in NAV which will have just one line of code in OnRun trigger
    wkky2l9oh22g.png
    Every time you run it it will show you a new GUID

    or

    2. In Visual Studio you have a function Create GUID in Tools menu

    or

    3. in SQL Server Management Studio clinke New Query, type and run SELECT NEWID() query

    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • vaprogvaprog Member Posts: 1,139
    edited 2017-09-28
    I just happened to stumble upon GitHub: Dynamics-NAV-Tools/XMLPort Generator/

    Don't know if it is useable, though.
Sign In or Register to comment.