send mail to user of list of incidents which are not updated from one week
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2023 07:30 AM
how can i notify user in on mail and share of list of incidents which are not updated from last one week

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 05:33 AM
Looks like your notification is not configured correctly, could you please paste the content of the email script which you are using in the notification. Will be able to share inputs once I see the email script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 03:39 AM
var gr = new GlideRecord('incident');
gr.addQuery('sys_updated_onRELATIVELT@dayofweek@ago@7^stateNOT IN7,8');
gr.addQuery('assignment_group=123^ORassignment_group=456');
gr.query();
var incidents = [];
while (gr.next()) {
incidents.push(gr.getValue('sys_id'));
}
var incidentsSysId = ["123","456","789"];
incidentsSysId = incidentsSysId.split(',');
var incnumbers = [];
for(var i = 0; i<incidentsSysId.length; i++){
var gr = new GlideRecord('incident');
if(gr.get(incidentsSysId[i])){
incnumbers.push(gr.number.toString());
}
gs.print('test '+incnumbers);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 03:53 AM
@Priti18 Where are you triggering event in this script? In order to send a notification you need to register an event in the event registry and trigger it via your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 06:23 AM
I used your above script where am passing the sys id of those incidents which are not updated from a week in an array as parm1 and triggering event --> this part is working i can see sysids of the records.
now these sys ids should go as a n incident number link in an email in a readable format to the user --> this is not coming so I used email script and above is the script, am not sure where is the issue in the script which i stopping it to go as link.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2023 07:24 AM
By email script I meant to say the script like the following which is used inside a notification to print dynamic values.
In the notification they are used like following.
The script you posted in reply should be used for preparing the event parameters and triggering the event.