Monday, April 29, 2019

NAV - How to create a Codeunit to export to Text File for X12 EDI

https://ediacademy.com/blog/ansi-x12-manual/

https://www.youtube.com/watch?v=46L_e832dGk





  • File1.CREATE( 'C:\Output.txt');
    File1.CREATEOUTSTREAM(OutStreamObj);

    OutStreamObj.WRITETEXT ('First line of text that you want to write to text file');
    OutStreamObj.WRITETEXT ('This is not the second line of text to be outputed but to concatenate with the first line');

    OutStreamObj.WRITETEXT(); // This command is to move to next line
    OutStreamObj.WRITETEXT('Second line will start here') ;

    File1.Close; // To end the writing and write out to the file.


    No comments:

    Post a Comment