Use Event to manage calendar appointments.

Documentation

Usage

Use Event to manage calendar appointments.

Querying and Filtering Events

Queries on events will be denied before they time out if they involve amounts of data that are deemed too large. In such cases, the exception code OPERATION_TOO_LARGE is returned. If you receive OPERATION_TOO_LARGE, refactor your query to return or scan a smaller amount of data.

When querying for events with a specific due date, you must filter on both the ActivityDateTime and ActivityDate fields. For example to find all events with a due date of February 14, 2003, you need two filters:

  • One filter with the ActivityDate field equal to the Coordinated Universal Time (UTC) time zone on February 14, 2003.
  • One filter with the ActivityDateTime field greater than or equal to midnight on February 14, 2003 in the user’s local time zone AND less than or equal to midnight on February 15, 2003 in the user’s local time zone.

Alternatively, in version 13.0 and later, you can find events with a specific due date by filtering on StartDateTime. For example, to find all events with a due date of February 14, 2003, filter with the StartDateTime greater than or equal to midnight on February 14, 2003 in the user's local time zone AND less than or equal to midnight on February 15, 2003 in the user's local time zone.

The EventId field of an EventRelation object always points to the master record. An invitee on a group event can query the EventRelation object to view the master record.

Multiday Events

  • Multiday events are available in version 13.0 and later. Also, in earlier versions SOQL queries do not return multiday events.
  • Multiday events are enabled through the user interface from Setup by entering Activity Settings in the Quick Find box, then selecting Activity Settings.
  • If the multiday event feature is enabled, then API versions 13.0 and later support values greater than 1440 for the DurationInMinutes field. API versions 12.0 and earlier can’t access event objects whose DurationInMinutes is greater than 1440.
  • Multiday events can’t exceed 14 days.

Recurring Events

  • Recurring events are available in version 7.0 and later.
  • After an event is created, it can’t be changed from recurring to nonrecurring or vice versa.
  • When you delete a recurring event series through the API, all past and future events in the series are removed. However, when you delete a recurring event series through the user interface, only future occurrences are removed.
  • When creating a recurring event series, the duration of the event must be 24 hours or less (either the DurationInMinutes or the difference between RecurrenceStartDateTime and EndDateTime must be greater than 24 hours). Once the recurring event series is created, you can extend the length of individual occurrences beyond 24 hours if Multiday events are enabled; see Multiday Events.
  • If IsRecurrence is true, then RecurrenceStartDateTime, RecurrenceEndDateOnly, RecurrenceType, and any properties associated with the given recurrence type (see the following table) must be populated.
  • When updating a recurring event series, it’s not possible to update the EventRelation for the event series object and the EventRelation for the series object occurrences at the same time.