Transform Map: To reject the record with error message
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 03:59 AM
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 04:38 AM
Hi Hyder,
You can write onAfter() script as Pratiksha suggested and do something similar to below sample code to log error.
var userName = source.u_user_id;
var gr = new GlideRecord("sys_user");
gr.addQuery("user_name", userName);
gr.setLimit(1);
gr.query();
if (gr.next()) {
return gr.user_name;
}
else{
log.error('There is no user available with USER ID ' + source.u_user_id);
}
Please mark this helpful if it helps.
Thanks & Regards,
Sharjeel
Regards,
Muhammad
Muhammad