Hi,
Im doing bulk import of data from staging table to target table through x++.
I need to capture the error log for each record and update it in a field in the staging table.
catch(Exception::Error)
{
stagingTable.log = infolog.text();
}
Whenever an error is captured it writes the error into the staging table.It works fine when it is executed in a non-batch mode.
When the import process is run as a batch job , the log is not updated correctly in the staging table.
During batch job, it updates just the first line of the infolog to all the erroneous records without updating the infolog for the coresponding record.
For example, against the 2nd record (000122idfgf) record it updates "BOM : 000121 000121 is created " instead of updating the actual error message for that record which should be “Number 000122idfgf does not match format ######.”
Kindly guide on how to achieve this.
Thanks & Regards,
Chutti