Looking to automate record creation based on a date
Long story short;
I have a 'Tenant' record, which has their 'Rent payment date' in a date field.
I've so far been unable to find a way to reliably create a new record triggered by a date.
I.e. If 'Rent payment date' = 'today()'' then create a 'Rent due' record linked with this tenant.
In the past when I've experimented with triggers from date fields, it ended up cycling the script nearly infinite times over as every second that passed by the logic of 'If 'Rent payment date' = 'today()'' continued to be true.
I'd want this script to always check if the date of today and the rent payment date match and create as many records as necessary for as many tenants who are due to pay their rent on any given date.
The script would also need to cycle the rent payment date for the next month and so on and so on, so that it can repeat each month.
Has anyone had success using dates to trigger the creation of new records, that could share some tips?
3 replies
-
Are you looking to automate this regardless of whether you are logged in or not, run it once on start-up, or at the push of a button? All are available options.
Regards John
-
There's this discussion about timed scripts which might work for you.
I've not come across issues with infinite loops before.
Content aside
- yesterdayLast active
- 3Replies
- 29Views
-
2
Following