capture error when import using Dataport

Hi,

I have created a dataport for sales header and i need to validate the customer no when importing. this is fine.

As am validating the customer no., if the customer does not have Customer posting group then system is throwing an error message and interupting the import process.

I want to capture the error message and store in a table and skip the record and process the next in the excel file.

Is it possible to capture the error and store in a table when using dataport?

Thanks in Advance

Franciya

Hi Franciya,

The easiest way is to check the posting groups (via code) before the validate and write a record to a customer table on finding an error.

Thanks Dave. i can understand as far as Customer posting group. But

validation for Customer no. have lots of functionality that will error if any data missing. is there a way to update the error in a table, if there is any error captured when validating.

Hi Franciya,

Unfortunately not, there is no error trap trigger to let you handle the error and proceed. What I would normally do is to dataport into a custom table and write a routine to update/validate from the custom table. This allows you to flag records causing an error and correct them later.

Would you please explain me more on this. Here what you say as Custom table is “Sales Header” as per my requirement or it is any temporary table that i need to create and update before importing into Sales header?

Hi Franciya,

I normally create a new table to import the data into (in a custom range) and then do an update into the Sales Header table. This allows you to review/fix the data in the custom table and does not interfere with the standard operations.

I usually use the Excel Buffer table to import and then move it to the wanted table after Validating certain key fields.

We import into variables & map it back. wrapping it with begin else end …
when needed

If customer.Get(“Dataport Cust No Field”) Then begin

mapmyfields back to nav fields
end else begin
Write something to external file
end;

Similar post:

http://www.mibuso.com/forum/viewtopic.php?f=23&t=42493

[:(] there is no error capture trigger in dataport.

But i can go ahead with the suggestions given

Thank to all for your support