Triggers: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 224: Line 224:
<source lang="javascript">
<source lang="javascript">
var m = moment().add(1,'d'); // Using the moment.js library function moment(),
var m = moment().add(1,'d'); // Using the moment.js library function moment(),
                             // get the current time and add 1 day
                             //   get the current time, and add 1 day
m.hour(8).minute(0);        // Set the time to hour 8 and minute 0
m.hour(8).minute(0);        // Set the time to hour 8 and minute 0
entryDefault().set("Date",
entryDefault().set("Date",
Line 230: Line 230:
</source>
</source>


The script must be set for Event '''Creating an entry''' and Phase '''Opening an Entry Edit card for Add'''. It will run synchronously.
The script must be set for Event '''Creating an entry''' and Phase '''Opening an Entry Edit card to Add'''. It will run synchronously.


== Working with files ==
== Working with files ==