Set import set row state to 'error' from source script in field map

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 08:17 AM
I'm trying to set an import row error from a source script in a field map.
Here's the code I'm using:
source.setValue('sys_import_state_comment', "There was more than one result returned for " + source.u_employeeid + " or " + source.u_objectguid);
source.setValue('sys_row_error', "There was more than one result returned for " + source.u_employeeid + " or " + source.u_objectguid);
source.setValue('sys_import_state','error');
Only the first line seems to actually have any result. The row I expect to be in "error" state is "skipped" instead, and my custom error is not written. What am I doing wrong? Is what I'm hoping to do impossible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2023 06:10 AM
I believe the OOB import set validations are overriding your custom error message and state value, I can see the system is not setting the error message as well as per your script. To override the error message and state value you can write a Business rule for that specific transform map on the Import set row table.