- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2016 08:01 AM
Hello, I am combed through the community but I seem to be stuck on what is probably a very simple request. I need to get the due date on our requests to default out 14 days and then we can change it manually if need be. Everything I have seen doesnt seem to work. Any ideas?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2016 08:04 AM
Hi Nicholas,
The easiest way would be with a before insert business rule.
var now = new GlideDateTime();
var twoWeeks = now.addDays(14);
current.due_date = twoWeeks;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2016 08:04 AM
Hi Nicholas,
The easiest way would be with a before insert business rule.
var now = new GlideDateTime();
var twoWeeks = now.addDays(14);
current.due_date = twoWeeks;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 01:14 PM
This doesn't seem to be working on a Date field. (not Date/Time)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2016 08:10 AM
Hi Nicholas,
You can keep this as a default value javascript:gs.daysAgo(-14); in dictionary for the field "Due Date". Something like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2016 08:29 AM
Hmm this doesn't seem to do anything when I try that.