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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 04:23 AM
Hello,
You can add custom error message in transform map script for below type:
OnBefore(),OnAfter()
Do you have script or you are just creating simple transform map?
https://old.wiki/index.php/Transform_Map_Scripts
Thanks,
pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 04:30 AM
Hi ,
I just created simple transform maps, now i need to add that message

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 04:48 AM
Hi,
In your transform map, write onAFter transform map, which execute on every row. There you can do your validation and if it fails, put a message
gs.addErrorMessage("your own error message");
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 04:58 AM
Hello,
if(source.field_name == ''){
log.info("Created new spkg: );
or log.warn("Message") }
}
if(action == 'insert'){
ignore = true;
}
Refer below link,
Thanks,
Pratiksha