Very simple request which is baffling me ..
All I want to do is when a PO is posted (and Receive is selected as the posting option) I wish to record the data within the posted PO as an XML file.
IF EXISTS('C:\temp\XML_CUSTOMER.XML') THEN
ERASE('C:\temp\XML_CUSTOMER.XML');
POFile.CREATE('C:\temp\XML_CUSTOMER.XML'); //Creates file
POFile.CREATEOUTSTREAM(POStream); //Creates stream
XMLPORT.EXPORT(8000,POStream);
POFile.CLOSE;
Works well, but I obviously end up with everything.
I know I need to use SETRANGE and probably record the appropriate Document Number, but just can't get my head round it! HELP! ](*,)
0
Comments
Option 1
Use the third, optional, parameter for the record set.
XMLPORT.EXPORT(Number, OutStream [, Record])
Example
Option 2
Declare XML Port as a variable "POExport"