- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 05:03 AM
when new emergency change create send notification all vip users in business rule using with event.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 08:30 AM
Hi @AJAYKUMAR G ,
You can do one small change to send email to VIP Users
IN BR
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var arrEmail = [];
var gr = new GlideRecord('sys_user');
gr.addQuery('vip', true);
gr.query();
while (gr.next()) {
arrEmail.push(gr.sys_id.toString());
}
gs.log("arrEmail = " + arrEmail);
gs.log("current.assigned_to.email = " + current.assigned_to.email);
gs.eventQueue('emergency.change', current, arrEmail);
})(current, previous);
Add this code
And in Notification pls do below thing
You have to check true to this parm 1 and parm 2 variable
Result
I have this 3 user is VIP and if we check the Email logs
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 05:19 AM
1. Create an event.
2. Trigger the event using gs.eventQueue('event name'), current, param1, param2) from your BR. Select insert as true.
Here in your param you can pass the VIP users.
3. Create a notification, Send when : Event is fired
Event name : Event created in step 1.
In Who will receive tab select event parm 1 contains recipient / event parm 2 contains recipient, wherever you're passing users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 05:27 AM
script in business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 05:45 AM
Example :
Business rule : After
Insert : true
Table : Change request
Condition : Type is emergency
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 06:30 AM
it is not working.