This documentation is archived and is not being maintained.

Calendar Entities

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

A calendar is like a work plan. It describes the terms and conditions about when a service or resource can be scheduled. A calendar may contain a calendar rule that specifies, for example, work hours from 9 A.M. to 6 P.M. every week day. It may also contain another calendar rule that specifies a lunch break from 12 P.M. to 1 P.M. every week day or it can specify vacation days. The organization has a calendar with rules for organization time-off that is also used in availability searches. Calendar time zone is a key piece of information that is used by the scheduling engine.

Calendars can be defined and shared on service and resource entities. The scheduling engine makes sure that all appropriate calendar rules are considered for an appointment request.

In addition to free/busy times, you can define effort (required/available) constraints on the calendarrule entity. These constraints are defined as the effort available from a resource to perform or deliver a particular service at a given time, including recurrence. Similarly, each service defines the effort required from the required pool of resources for completion of one unit of service for its specified duration. The scheduling engine automatically computes the appropriate time blocks for an appointment when total effort required for a given service is less than or equal to the total effort available by all the required resources. For example, an auditorium may have 50 seats for a show and capacity would be subtracted from the number of seats for each member in a service activity.

There are two types of calendar rules in Microsoft Dynamics CRM:

  • Root: A calendar rule that contains an inner calendar or that has nested (leaf) rules. You can specify an inner calendar for a root calendar rule using the innercalendarid property. The property value of innercalendarid of a root rule is same as the property value of calendarid of its leaf rules.
  • Leaf: A calendar rule that does not contain an inner calendar, and therefore is the end of the "branch".

Calendar rules are ordered, or ranked, to describe their precedence and rules can overlap. The nested rules expansion defines the time span, or extent, of a rule. The extentcode property defines how rule expansion overlap is handled, for example, whether both are shown or if one is occluded, and so on.

These features provide for recurrence patterns, for example, different shift schedules for winter and summer months in a single service calendar.

A calendar can be a complex tree of rules and nested calendars that represent a high-level abstraction of the work schedule. The calendar entity supports the ExpandCalendar message to convert to a simple view, which is an array of time blocks that determine availability over specific ranges.

The following illustration shows the entity relationships for this area. For more information, see Key to Entity Diagrams.

Calendar entity model

See Also


Other Resources

© 2010 Microsoft Corporation. All rights reserved.