A newer version of this page is available. Switch to the current version.

Custom Fields

You can define any number of mappings to data source fields that are not used by the Scheduler itself. The content of these fields is available via the PersistentObject.CustomFields property of the Appointment and Resource objects.

To bind a data field ("CustomField1") to the appointment custom field ("MyNote"), use the following code:

this.schedulerDataStorage1.Appointments.CustomFieldMappings.Add(new AppointmentCustomFieldMapping("MyNote", "CustomField1")); 

Names of data fields mapped to the resource or appointment properties must be unique.

You can also use the Mappings Wizards to create custom field mappings.

To access "MyNote" data for the selected appointment, use the following code:

object note = schedulerControl1.SelectedAppointments[0].CustomFields["MyNote"];

Custom Field Mappings should not use names from the list of the standard appointment properties (see the Appointment Mappings document) if the Scheduler operates in unbound mode. For example, the following mapping may result in incorrect appointment processing:

AppointmentCustomFieldMapping customNameMapping = new AppointmentCustomFieldMapping("MyCustomIdField", "Id");

because "Id" is the name of the standard appointment property.