- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 04:28 AM
Hello Team,
I'm trying to trigger a notification when any user's try's to load a data using transform map and he gets few error/skipped/ignored.
I have created notification and trying to trigger using event but how to use event on transform map table.
Can anyone help me with the steps if possible.
Thanks,
Chaitanya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 08:33 AM
Hi Chaitanya,
in that case you need to query the staging table with the import set number and print the information
Sample below: just enhance it
(function runMailScript(current, template, email, email_action, event) {
template.print("<table width=70% border=1><tr bgcolor=#e2e0de><td>Row</td><td>State</td><td>Error</td><td>Comment</td></tr>");
var gr = new GlideRecord('staging table');
gr.addQuery('set', current.set);
gr.query();
while(gr.next()){
template.print("<tr><td>gr.sys_import_row</td><td>gr.sys_import_state</td><td>gr.sys_row_error</td><td>gr.sys_import_state_comment</td></tr>")
}
template.print('</table>');
})(current, template, email, email_action, event);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 08:33 AM
Hi Chaitanya,
in that case you need to query the staging table with the import set number and print the information
Sample below: just enhance it
(function runMailScript(current, template, email, email_action, event) {
template.print("<table width=70% border=1><tr bgcolor=#e2e0de><td>Row</td><td>State</td><td>Error</td><td>Comment</td></tr>");
var gr = new GlideRecord('staging table');
gr.addQuery('set', current.set);
gr.query();
while(gr.next()){
template.print("<tr><td>gr.sys_import_row</td><td>gr.sys_import_state</td><td>gr.sys_row_error</td><td>gr.sys_import_state_comment</td></tr>")
}
template.print('</table>');
})(current, template, email, email_action, event);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 08:15 AM
Sorry for late update on this. Thanks for help it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 08:29 AM
You are welcome
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader