Want to populate date in custom field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2023 06:43 AM
Hello Experts,
I have one custom table in which I have created three fields that is trigger type which is monthly,
Due day of month whose datatype is an integer, next schedule execution date whose data type is glide_date_time.
now my requirement is after the creation of the schedule I want to populate the next scheduled date in the next scheduled execution date field.
suppose today 25/10/2023 I am creating the schedule and my due date of the month is 26. now
next scheduled date should be 26/10/2023 how can I achieve this please guide me on this thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2023 06:52 AM
Hi,
You can create a business rule, or a Flow that sets the value, whenever the due-day-of-month value changes.
A simple example below:
var gdt = new GlideDateTime('2023-10-25');
var dayMonth = 26;
gs.info('original date: ' + gdt.getValue());
gdt.setDayOfMonthUTC(dayMonth);
gs.info('modified date: ' + gdt.getValue());