- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 11:01 PM
Dear All,
i have written script to send notification form transform map run script when inbound request comes to import set api.
Event is generated and it getting processed with in 2 seconds but no email entry in email logs.
i am able to preview email in notification window.
below line of code is used to trigger event from run script of transform map.
gs.eventQueue('importset.Incident.created',source,"test1@mail.com,test2@mail.com");
i have created Event and Notification on import set table.
Please let me know if missed anything here or let me know tips to troubleshoot it.
Thanks,
Ram.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2020 11:15 AM
Thanks Abhishek for responding my query.
I am able to triggering event from transform map run script and email is triggered with that event.
it was working after renaming event name with lowercase letters.
Thanks,
Ram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2019 09:40 AM
You can create a business rule on table sys_import_set_run and fire event as per defined conditions.
Events and Email Notification - ServiceNow Wiki
OR:
In your transform map, you can create an onComplete transform script that runs at the end of the import.
The advantage of an onComplete script is that you have access to the error flag along with several other objects.
When: The onComplete event script is processed at the end of an import run, after all data rows are read and transformed.
Import Set JS object | Type | Context in the onComplete import set event |
source | GlideRecord | The last row of the source import set table. |
target | GlideRecord | The last row of target table. |
import_set | GlideRecord | The import set that is currently being transformed. |
map | GlideTransformMap | Read-only information about the current transform map record. |
log | Function | The log object for the current import run. For example, log.info(...), log.warn(...), log.error(...). |
error | Boolean Flag | When set to true, will mark the current import set status to error after it completes. |
Please mark as Correct Answer and Helpful, if applicable.
Thank You!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2020 11:15 AM
Thanks Abhishek for responding my query.
I am able to triggering event from transform map run script and email is triggered with that event.
it was working after renaming event name with lowercase letters.
Thanks,
Ram.