- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 02:13 AM
Hi All,
I have a requirement to always set the due date of a specific record producer always to 24 hours after the created date/ always the next day.
How can I achieve this?
Thanks!
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 03:41 AM
Hi,
why not use record producer script itself and you don't need any extra BR etc?
var gdt = new GlideDateTime();
gdt.addDaysUTC(1);
current.setValue('due_date', gdt.getValue());
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 03:38 AM
Hi Alex,
Please make sure variable names are correct add some info messages to know where is the problem please.
***Mark Correct or Helpful if it helps.***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2022 03:41 AM
Hi,
why not use record producer script itself and you don't need any extra BR etc?
var gdt = new GlideDateTime();
gdt.addDaysUTC(1);
current.setValue('due_date', gdt.getValue());
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 03:20 AM
Thank you! All worked 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 03:24 AM
@Alex
Glad to help.
Would you mind marking your earlier questions as answered by marking appropriate responses as correct to close them.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader