Accessing the Calendar through mwScript

As of MoneyWorks 9.1.7, it is possible for a script to access the contents of the calendar. For example, a scheduling script could check in a nominated calendar to see if it was a holiday, and not schedule deliveries for that day.

To access the calendar:

    let entries = cal:getEntries(forDate, calendarName)

returns all entires for the specified calendar and date as newline delimited text.

  • For the main calendar, calendarName should be empty, i.e. ""
  • To get entries for all calendars, use "@" as the calendar name. The text returned will be tab delimited, with the calendar name in the first column and the entry in the second. The calendar name will be prepended with a "U" or a "C", depending on whether it is a user calendar of one created in the Calendars validation list.