Drafts Script Reference
    Preparing search index...

    Class Event

    Event object represent individual calendar events. For usage examples, see Calendar object documentation.

    Index

    Constructors

    Properties

    alarms: Alarm[]

    The alarms assigned to the event, if any.

    attendees: Object[]

    Attendees of the event as an array of objects in the format:

    {
    "isCurrentUser": false,
    "name": "John Appleseed",
    "status": "accepted",
    "type": "person",
    "role": "required"
    }
    availability: "busy" | "free" | "tentative" | "unavailable" | "notSupported"

    Availability for scheduling. Not supported by all Calendar servers.

    calendar: Calendar

    The calendar which this event resides in.

    creationDate: Date

    Original creation date of the event.

    endDate: Date

    End date of the event.

    hasAlarms: boolean

    Returns true if the event has any alarms.

    identifier: string

    Unique identifier for the event

    isAllDay: boolean

    Flag for all day events.

    lastError: string

    If a function fails, this property will contain the last error as a string message, otherwise it will be undefined.

    lastModifiedDate: Date

    Last change to the event.

    location: string

    Location of the event.

    notes: string

    Notes associated with the event.

    startDate: Date

    Start date of the event.

    title: string

    The title of the event.

    url?: string

    URL associated with the event. Setting URL value will fail if the value is not a valid URL.

    Methods

    • Add an alarm object to the event. Be sure to update() to save after adding alarms.

      Parameters

      Returns void

    • Open the event in the system event editing card. The user will be able to modify/edit the event values and add to a calendar from this view. Returns true if the event was saved, false if the user canceled or deleted the event.

      Returns boolean

    • Remove any assigned alarms from the event.

      Returns void

    • Save the event. Returns true if the event is successfully saved in Calendars.

      Returns boolean

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.