how to trigger notification from Business rules?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2023 07:25 AM
In the Additional Comments Field , whenever @User name is used Email is sent . and those details are stored in the live_notification Table .
so the Business rules should trigger when the live_notificaiton is created for that particular Incident record and the OOB notification should trigger for that particular Caller_id.
and the email sent should be displayed in the activity stream .
Businee rule
table : Live_notification.
when to run after insert and update
(function executeRule(current, previous /*null when async*/) {
var user = new GlideRecord('live_notification');
user.addEncodedQuery('profile' + current.comments.getJournalEntry());
user.addEncodedQuery('document' + current.sys_id);
user.orderByDesc('sys_created_on');
//user.addEncodedQuery('field_name=comments' );
user.query();
gs.log('live= ' + current.comments.getJournalEntry(1));
if(user.next()) {
gs.eventQueue('Activity Stream @Mention Email',current,gs.getUserID(),gs.getUserName());
}
})(current, previous);
Notification is OOB : Activity Stream @Mention Email.
notification is not displaying in the Activity stream.
how tosolve this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 02:19 AM
@raphaelcrv In return the Body of the Email and the Recepients should be captured in the activity in incident record how to do that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2023 03:55 PM
The e-mail will be on the activity when the e-mail status is changed to sent, if you are using a lower enviroment like staging or dev, go to the outbox find the e-mail record created and change the status to sent and take a look on the activity
Let me know if worked