
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2019 05:48 AM
We currently have a flow that runs off a service request, of which we generate a 12 day lead time.
Within the flow, we need tasks to run within this lead time and wondered how to schedule these within flow designer.
i.e. flow creates task which is due 5 days prior 'due date' of requested item.
Does anyone know a way or code I can add into the field within the flow designer to achieve this (use alongside the 'due date' data pill)
Thanks!
Solved! Go to Solution.
- Labels:
-
Flow Designer
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2019 06:27 AM
This would require a custom action definition that you can build. It doesn't require much for code, just using GlideDateTime().addDaysLocalTime() to add/subtract whatever values you pass to the function and return a new date/time.
Action Designer | ServiceNow Docs
Sorry, I don't have a quick link to a video where I built a custom action. You might want to search one of our Live Coding Happy Hour videos.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2019 06:27 AM
This would require a custom action definition that you can build. It doesn't require much for code, just using GlideDateTime().addDaysLocalTime() to add/subtract whatever values you pass to the function and return a new date/time.
Action Designer | ServiceNow Docs
Sorry, I don't have a quick link to a video where I built a custom action. You might want to search one of our Live Coding Happy Hour videos.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2019 12:27 AM
Thanks Chuck - apologies, I'm new to any form of code, so struggling with the script.
I've created an action with inputs:
delivery date (original date from requested item)
days (to calculate the + or - value i.e. -5)
activity due (to be populated as an output)
Could someone kindly provide me with some guidance on the code please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2023 04:17 AM
hey @Natalie8 did you get a code for this if yes please can you provide me please very urgent