addDays function not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:37 AM
I'm confused, you are logging out "rec.variables.effective_date", which you are not doing any adding of days to.
You say this is a flow but you are not providing enough information to really track things thru what you are doing.
I do agree with Animesh in that the system does not always like dates that are in the past and maybe altering the data before insert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:02 AM - edited 02-24-2025 11:20 PM
Hi @dvelloriy ,
As you are trying to put a past date as the next run, which is logically wrong, the OOB BR, 'Ensure valid schedule' on 'sys_trigger' table might be getting triggered and setting the next run value as current time stamp.
Can you check if this BR is getting triggered with the help of some log statements.
If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:11 AM
Hi Animesh,
No its not the past date. Trigger action should always be in future.
I am creating this trigger only when effective date is more than 30 days..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 11:42 AM
Try to Add a static future date from the script and see if you are facing any issues.
If it is inserted properly then the issue is with the date you passing.