Trigger an event using background script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2022 01:45 AM
Hi,
I am having one requirement to build a notification to notify a group when the record is inserted in 'quarantine_file'. To test this notification, I need to create an event and then trigger the notification with the event.
But I haven't worked on event before. So kindly help me to trigger the event through background script so that I could test the notification as we cannot directly create a record in 'quarantile_file'.
Thanks in Advance!!
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2022 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2022 07:06 AM
Hi OlaN ,
This is working for me but as quarantine_file is not a table but a database view and having limited fields shown below but I want to fetch incident number to which that file got attached and in created by I am getting UserID but instead of that I need to fetch the username who has attached the file.
Can you please let me know how to fetch the username and incident number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2022 01:56 AM
Hi,
It is same as from business rule or other server side script, only thing to note is that unlike BR you dont have access to current object. so instead of that pass the Glide Record object of the record
gs.eventQueue('<Event Name>',<GlideRecord Object of the record>,<parm 1>, <parm 2>);
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2022 07:03 AM
Hi
This is working for me but as quarantine_file is not a table but a database view and having limited fields shown below but I want to fetch incident number to which that file got attached and in created by I am getting UserID but instead of that I need to fetch the username who has attached the file.
Can you please let me know how to fetch the username and incident number.