Heyas I came accross a small problem with xml port.
I'm exporting sales invoice data out and would like to filter the output records by the sales invoice header primary key.
The problem is that I'd need to have a root element before the salesinvoice element that has the source table.
mm so how can I set table view for the table when calling the xmlport?
I tried fex:
...
xmlportname.settableview(therecord);
xmlportname.setdestination(thestream);
xmlportname.export;
...
K.S.
0
Answers
What I have done in past is to create a function in xmlport called setrecord and
on OnPreXMLItem I've added code to filter on record passed
Myxmldataitem.setrange("Document type",Myxmldataitem."Document type"::Invoice);
Myxmldataitem.setrange("No.",globalRecord."No.";
the function setrecord would look like this.
setrecord(localRecord)
GlobalRecord := LocalRecord;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n