- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 07:54 PM
Hi All,
I need to send a notification to certain group when transform map fails, I am using schedule to run the transform map daily.
I also require a notification with the number of insert, update, etc and other notification should trigger when transform map fails.
Please guide me here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2022 01:18 AM
Hi @Priyanka145 ,
You don't have to deal with Transform Maps for this. In your BR that you have written on Transform History table , use the below script:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var message = "";
var grLog = new GlideRecord("sys_import_set_row_error");
grLog.addQuery("run_history", current.getUniqueValue());
grLog.query();
while (grLog.next()) {
message = message + grLog.error_message + " for Row Number - " + grLog.row.getDisplayValue() + "\n";
}
if (message != "")
message = "<b><u>Error in data transformation:</b></u> <br\>" + message;
gs.eventQueue("th.transform.status", current, message, "");
})(current, previous);
Now finally add this message that you have sent in your event as parm1 to your notification as shown below :
Now when your event will trigger if there is any error while transform, it will appear in your notification:
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 08:04 PM
Hi,
Please check below links:
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2022 02:58 AM
Hi Anil,
I have followed one of the link provided and trying to trigger a notification using an event , and Business rule is created for it.
Notification is getting generated but values are not populating . Please help me here.
BR written on Transform History table.
(function executeRule(current, previous /*null when async*/ ) {
var importSet = new GlideRecord('sys_import_set');
importSet.addQuery('sys_id', current.set);
importSet.query();
if(importSet.next()){
gs.eventQueue("DataLoad.completed", importSet, importSet.sys_id, importSet.number);
}
})(current, previous);
In the notification part, when event is fired, given the event name
When I previwed, I could see all the values in it. But for the email generated, the values are empty as below. Only number is getting populated.
@Ankur Bawiskar Could you please guide me here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2022 03:28 AM - edited ‎10-26-2022 03:29 AM
Hi @Priyanka145 ,
You are querying the wrong table, Modify the condition of your BR (I assume your BR is on Transform History Table) and put it something like shown below :
No need to GlideRecord to any table. Just trigger the event in the script and pass the current record. Your notification will work fine.
gs.eventQueue("DataLoad.completed", current, '', '');
Let me know if this do not works.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2022 04:04 AM - edited ‎10-26-2022 04:23 AM
Hi Kamlesh,
I also need to display total number of inserts, updates, skipped, ignored
So, all these are available on the Transform history table only sys_import_set_run. I am using this table only
I need to show the total , insert, updates, etc and at the bottom 2 are skipped.
I also need to show them over the email with comment.
Please guide