- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2022 08:05 AM
How to add 5 business days using flow designer? It should auto populate the next contact date once I run test. Please help me. Thank you!
Solved! Go to Solution.
- Labels:
-
flow designer
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2022 08:34 AM
Hello ,can you try this below script
var contactDate = new GlideDateTime(fd_data.trigger.current.your_last_contact_field_backend_name);
var days = 5;
//assuming there are 8 business hours
days = days*8;
var dur = new GlideDuration(60 * 60 * 1000 * days);
var schedule = new GlideSchedule('your_schedule_sys_id'); //put your schedule sys_id here which can be 9 to 6 or 8 to 5 schedule which can be found in cmn_schedule table
return schedule.add(contactDate, dur);
MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2022 08:34 AM
Hello ,can you try this below script
var contactDate = new GlideDateTime(fd_data.trigger.current.your_last_contact_field_backend_name);
var days = 5;
//assuming there are 8 business hours
days = days*8;
var dur = new GlideDuration(60 * 60 * 1000 * days);
var schedule = new GlideSchedule('your_schedule_sys_id'); //put your schedule sys_id here which can be 9 to 6 or 8 to 5 schedule which can be found in cmn_schedule table
return schedule.add(contactDate, dur);
MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 05:08 AM
Hi @Mohith Devatte ,may I know what is the 60 here? I tried using the script provided but my next contact date becomes next month.
60 * 60 * 1000 * days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2023 08:38 AM
60 m, 60 sec, 1000 millisec