Some xml export filtering help needed

KisuKisu Member Posts: 381
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.

Answers

  • ara3nara3n Member Posts: 9,256
    and it didn't work?

    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;
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.