- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 12:33 PM
I added a related list (FINTASK) to the Financial Management app, to create tasks sent to individuals (users) related to the Fin Ticket. Every task has a mandatory (manually filled in) due date.
I would like to send an email (your task is almost overdue) to the assigned to when TASK is 1 hour before the due date (escalation = 2) and and email (Your task is overdue) when due date has passed (escalation = 3).
As being not familiar with scripting, I am looking for a solution to get the value for the Escalation field updated based on the Due Date.
Any help is welcome 🙂
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 02:13 PM
Yes, that was the only piece that I was concerned about. Most likely you will need to restart the workflow.
I would create a business rule on your table that only triggers when the Due date field is changed:
Name: Restart WF when Due date changes
Advanced: true
When: After
Insert: false
Update: true
Conditions: current.due_date.changes()
Script:
(function executeRule(current, previous /*null when async*/) {
new Workflow().restartWorkflow(current);
})(current, previous);
Let us know if you are successful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 01:06 PM
There are two ways you can accomplish this:
1. Use SLA Definitions and an SLA workflow that triggers the warning and breached notifications.
2. Use a Scheduled job to trigger the warning and breached notifications.
Let us know which way you prefer so we can focus our solution accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 01:14 PM
Thanks Christopher,
Was more hoping for a Business Rule that would trigger the Escalation value based of the Due Date (date and time)..... Would like to have the option to change the Due Date to impact the Escalation value....
-- Titus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 01:29 PM
It sounds like you want some sort of date field used to trigger the notifications.
A third option, which may be a combination of both would be to leverage the Due Date field in a workflow.
- This workflow would run when the record is created.
- Within the workflow, you would have Timer Workflow activities that would wait for the Due Date to be a particular time.
- One would wait for an hour before, then trigger an event.
- Another would wait for the Due Date, then trigger another event.
Depending upon if you want the second notification sent more than once will determine how best to design the workflow.
If you are not familiar with Timer Workflow Activities, here is a page for your reference:
Timer Activities - ServiceNow Wiki
Let us know if this is a viable solution so we can provide more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 01:32 PM
Thanks Christopher,
That sound like a solution! Will try it for the weekend 🙂
Cheers!