Hello Nav experts.
I wrote an XMLPort and created a codeunit to execute the XMLPort. And it is working fine. I just need to pass some information from the code unit to the XMLPort so that it can be added on the processing and be written to a table (General Journal Line).
In my code unit, I have created a global XMLPort variable like
Variable: xml_XMLImport
Type : XMLPort
SubType: JournalEntries
Part of my code looks like this.
TestFile.OPEN('NAV.xml')
TestFile.CREATEINSTREAM(TestStream);
xml_XMLImport.SETSOURCE(TestStream);
// xml_XMLImport.SETTABLEVIEW(Rec); // I can set this from codeunit, don't know how to retrieve it from the XMLPort
// HERE: I need to set some global variables in the XMLPort
xml_XMLImport.IMPORT();
TestFile.CLOSE;
Can you please let me know how to pass text or record variables to the XMLPort.
Thank you in advance.
0
Answers
In your code called the function
TestFile.CREATEINSTREAM(TestStream);
xml_XMLImport.SETSOURCE(TestStream);
xml_XMLImport.PassParameters(yourValue);
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Regards,
ChessExpert.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n