trigger a notification on the change_request if the Planned End Date has only 3 hours remaining
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2023 02:19 PM
Hello,
I'm looking for a solution to trigger a notification on the change_request when the Planned End Date is only 3 hours away. I have tried using GlideDateTime, subtracting time, and gs.eventQueueScheduled, but I seem to be missing something each time. I want to ensure that the notification only triggers if the Change Request is not closed, even if I schedule an event, and the user completed the change, he will still receives the notification. We only want notification to trigger if the state is not closed complete. Could someone please assist me in achieving this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2023 05:45 AM
Hello, below is the script I am using. I don't know but it's always leaving the processed date empty in the Event logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2023 08:33 AM
Hi, You can achieve it through code. The below email functions are OOB. But, in your business rule you should validate the planned End Date with the current time using date/time functions.
email.setFrom("umassmeddev@service-now.com");
email.setReplyTo("robert.poschmann@umassmed.edu");
email.setSubject("This is the new subject line");
email.setBody("This is the new body");
Suresh.