XMLPort export not respecting record filters (NAV2016)

EvREvR Member Posts: 178
Hi all,

I'm trying to export specific records using an xmlport but the record filters are not applied, so the whole table gets exported.

SalesShipmentHeader.SETFILTER("No.",DocumentFilter);
IF NOT SalesShipmentHeader.ISEMPTY THEN
XMLPORT.RUN(XMLPORT::"Shipment Export",FALSE,FALSE, SalesShipmentHeader);


I've tried using XMLPORT.EXPORT in the same manner, with the same result.
XMLPortVariable.EXPORT has the same behavior.
I've tried GETs/FINDFIRSTs instead of ISEMPTY. Same thing.

If I show a COUNT on the SalesShipmentHeader first, it shows the number of records I expect. But the resulting XML still contains the whole table.

Any suggestions?

Gr, Erik

Best Answer

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Create a function in XMLPort and call this function before export and assign the passed record variable to source table of xmlport
  • EvREvR Member Posts: 178
    That's a workaround.
    But I'm wondering why the RUN and EXPORT methods have a record parameters if they are not being respected and/or used. The exact same thing happens in the REPORT.PRINT method. It accepts a record, but then prints the whole table. 2016 CU9.
Sign In or Register to comment.