Options

XML Port SKIP

JuhlJuhl Member Posts: 724
edited 2014-08-16 in NAV Three Tier
Hi all

Is it possible to SKIP a record on Import when importing to Table/Field directly, instead of putting all values in Text Type, and do the sorting and Insert?

I have a single field in the importfile i need to test on, and call currXMLPort.SKIP if test fail.
Othervise all fields go to at table that matches the file layout.

None of the triggers seem to Work, even if i make that one field a Text variable.

The reason is that the record that need to be skipped has a Bigtext field, but all other records using the same layout is whitin the 250 limit on NAV2013, and i dont need this record-type. I am importing to a temporary import tabel, and this file has a lot of diffenrent records, identyfied by the first field in the file.
Follow me on my blog juhl.blog

Comments

  • Options
    SavatageSavatage Member Posts: 7,142
    http://msdn.microsoft.com/en-us/library/dd339042.aspx

    Skips the current iteration of the current dataport, report, or XMLport.
  • Options
    vaprogvaprog Member Posts: 1,123
    With imports you should do the SKIP in the Import::OnBeforeInsertRecord() trigger.
    I never tried anything else, but given the pickiness of NAV XMLports when it comes to sequence I'd be surprised if anything else worked.
  • Options
    JuhlJuhl Member Posts: 724
    It still validates the value against the field or variable, even If you call SKIP.
    So the solution is to use variables, and the column where the lenght is more than 250, you use a bixtext variable, and insert into text field in Table.
    Follow me on my blog juhl.blog
Sign In or Register to comment.