- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2019 07:14 AM
Hi ,
I have a query ,How can i send notification to manager of 'assignment group' of application if 'owned by' user account is inactivated under application(cmdb_ci_appl) table.
Thanks .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2019 07:22 AM
Hello,
You need to a write a scheduled job that queries all the records from cmdb_ci_appl table where owned_by user is inactive and then trigger an event which sends the required notification to the manager of CI assignment group.
Sample script
var ci = new GlideRecord('cmdb_ci_appl');
ci.addEncodedQuery('owned_by.active=false');
ci.query();
while(ci.next()){
gs.eventQueue("replace_event_name_here", ci, ci.assignment_group.manager, ci.owned_by.name);
}
The first parameter for Event is sys_id of the assignment group manager and second parameter is the name of Owned by user.
In your email, select this event name as its source and also make sure you check the Event parm1 contains recipient check box in it so manager gets the notification.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2019 07:22 AM
Hello,
You need to a write a scheduled job that queries all the records from cmdb_ci_appl table where owned_by user is inactive and then trigger an event which sends the required notification to the manager of CI assignment group.
Sample script
var ci = new GlideRecord('cmdb_ci_appl');
ci.addEncodedQuery('owned_by.active=false');
ci.query();
while(ci.next()){
gs.eventQueue("replace_event_name_here", ci, ci.assignment_group.manager, ci.owned_by.name);
}
The first parameter for Event is sys_id of the assignment group manager and second parameter is the name of Owned by user.
In your email, select this event name as its source and also make sure you check the Event parm1 contains recipient check box in it so manager gets the notification.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2019 04:11 PM
Hi,
I don't think you can send Notification to a Email Address linked to an User Account which is Inactive i.e. Active Flag marked as True.
Regards,
Shloke
Regards,
Shloke