In
http://www.mibuso.com/forum/viewtopic.php?t=748&highlight=export+objects it is explained how to export in code to a fob file.
Now, I would like to create a txt file (export an object to text through c/side-code) and no binary fob file. Does somebody know how to do this?
Comments
HTH
RIS Plus, LLC
but I would want to create such txt files in CODE. So, how can I write a codeunit to export objects to text-files?
Thanks anyway for taking the time to reply
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
RIS Plus, LLC
I realised it by this:
OnPreDataItem:
OutputFile.CREATE(lrc_ServiceEinr."Exportpfad " + gtx_Filename + '.txt');
OutputFile.TEXTMODE(TRUE);
The variable OutputFile is a "file" and the field "Exportpfad" is a new field in the table "Service Mgt. Setup". Into this field you can type in your path, where the file is to be saved.
And into the OnAfterGetRecord Trigger:
OutputFile.WRITE( your variables );
I hope I understood your problem right. And I hope you understand my confusing description