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 04:33 AM
Hi @Shreya3
You can create Daily scheduled job to check if catalog task is not in closed state (Compare days between task creation date and current date) and if days difference is more than 7 days then trigger notification through gs.eventQueue()
Please Mark this Helpful and Accepted Solution if it solves your issue.
Thanks & Regards,
Shikha Tyagi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:36 AM
Hi @Shreya3
Here you having the solution for your ask:
Please mark my answer correct and helpful if it helps you to resolve your issue.
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:44 AM
Hi @Shreya3,
Hope you are doing well.
I tried to find the solution for your scenario or requirement and give the perfect solution in one go.
Solution Proposed
As a solution, you need to follow just 3 small steps to achieve the task or requirement: -
- Create a new record in "Schedule Job (sysauto)" Table that will continuously run on a daily basis and check for the open tasks which have passed 1 week of time. This job will trigger the event created by you.
- Create an Event in "Event Registry" Table.
- Create a new Notification based on an Event that you'll create.
Let me know if this suits you or I need to do the following steps and implement it on my Personal Developer Instance, so that you will be able to get the solution as soon as possible.
If you find this answer/solution/suggestion as helpful to your question asked or meet with your requirement, you can mark this solution/answer/suggestion 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 06:39 AM
Hi Akash can you showcase me schedule job exact code which will work for both scenario because i am not able to do and i am creating schedule job that is running on demand not on daily basis. table is sc_task. i have created event registry and notification.