Dear All,
In Nav 4.0, I have trying to export Customer List in XML file Format using XMLPort and Codeunit.
I am facing problem and not able to export data in XML file in Nav 4.0. Navision crashes when I try to export data in XML file using code as below: I have also attached XML Port design snapshot.
I have tries same code in Navision 2009 R2 and it has export XML File successfully. Is it XML Port Limitation in Nav 4.0 that it can not export data in XML Format. Any suggestion/help to solve my problem is appriciate.
Codeunit : OnRun() Trigger
IF EXISTS('D:\Test\Customer.xml') THEN
ERASE('D:\Test\Customer.xml');
CLEAR(TestFile);
CLEAR(TestStream);
XMLFileName := 'D:\Test\Customer.xml';
TestFile.CREATE(XMLFileName);
FileOpened := TestFile.OPEN(XMLFileName);
TestFile.CREATEOUTSTREAM(TestStream);
CustomExport.SETDESTINATION(TestStream);
CustomExport.EXPORT;
TestFile.CLOSE;
MESSAGE('XML Customer Export Complete.');
0
Comments
Did you find any solution for this issue.
We are facing the same issue.
Manish
...I'm not sure if that is the problem or not (maybe it opens the file in read only mode) but it shouldn't really be there.
If that doesn't fix it then show us the code you are using and highlight which line of code is causing the crash (you can use the debugger to step through the code).