Regarding creation of notification when catalog task is not being closed after 1 week
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:27 AM - edited 03-21-2024 04:36 AM
how we can built from scratch the code for creating notification to be sent to technology Ci Owner manager and cc technology ci owner and suppport group if catalog task has not yet been closed after 1 week. And also need help for creating notification to be sent to technology Ci Owner manager and cc technology ci owner and suppport group to create p1 incident and then send email if catalog task has not yet been closed after 2 weeks . please help on this. I have created 2 event registry , 2 email notification and 1schedule job. but in schedule job i am not able to put proper code for both of the scenarios can anybody help on this asap, as I am new to this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 06:52 AM
Akash i will check if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 06:56 AM
Hi @Shreya3,
Glad to hear that you are able to find it. Please have a look and mark this solution as helpful and correct.
Thanks
Aakash Garg
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 07:49 AM
akash can you please help me with encoded query part screenshot for sc-task.list i tried putting filter of what you shared but for me it is not coming in proper way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 08:07 AM
Hi @Shreya3,
Please find the attachment for past 7 days. You can try to apply it for 14 days according to this. Let me know if you need any help in that.
Thanks 🙂
Aakash Garg
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:50 AM
Hi Akash for testing purpose i tried sending notification to particular user and though he is getting email notification but he is getting more than expected. like if he should get only 6 times he is getting more than 6 times which is not expected (he is getting continuously on loop 700+). for schedule job code i have used on demand .and my code is:
var abc= new GliderRecord("sc_task");
abc.addEncodedQuery('sys_created_onRELATIVELT@dayofweek@ago@2^sys_created_onRELATIVEGT@dayofweek@ago@3^state!=4');
abc.query();
while(abc.next()){
gs.eventQueue("demo.event.sox" , abc);
}
can you tell me where I am getting wronged please asap?