All data is sent from CRM to Dime.Scheduler through the Dime.Scheduler Web Service. The Dime.Scheduler Web Service is a generic web service that uses a Name/Value-pair schema which allows for unlimited flexibility in both the source and the format of the data and also allows for the business logic to reside within CRM.
The following types of data can be sent from CRM to Dime.Scheduler:
|Resources and the resources' filter values||Remember that a resource is a general term and that you can sent any data from CRM as a resource to Dime.Scheduler whether this represents a person, machine, (office) equipment, hotel or meeting room, car …|
|Jobs and tasks and the tasks’ filter values||Remember that jobs and tasks are general terms and that you can send any data from CRM as a job and its associated tasks to Dime.Scheduler whether these are from standard tables, custom tables or tables that are part of a vertical solution.|
|Filter groups values|
|Categories||The category determines the color of an appointment in Dime.Scheduler.|
|TimeMarkers||The time marker is shown as a colored horizontal or vertical bar attached to the appointment in Dime.Scheduler.|
|Appointments||When a task is planned in Dime.Scheduler, an appointment is created. From CRM you can create appointments directly into Dime.Scheduler. |
For example, when a holiday request from an employee is registered, you can send that record as an appointment to Dime.Scheduler, thereby informing the planners immediately of the holiday. With a proper security setup in Dime.Scheduler, planners will see that appointment but cannot modify nor delete it.
|Appointment Updates||Specific functions are provided to update an appointment's category or time marker. The category and time marker control the colors displayed on the planning board in Dime.Scheduler and are frequently used to visualize the status of an appointment. For instance to indicate that a task has started, is in process, is completed or is overdue but also to show for example that the associated document or transaction in CRM has been invoiced.|
|Task and Appointment Locks||Appointments can be locked or unlocked. A locked appointment is not editable in Dime.Scheduler. Individual appointments can be locked or unlocked and all appointments attached to the same task can be locked or unlocked.|
|GPS Tracking and Asset Location||When you receive or store GPS tracking or asset location data in CRM, you can send that data to Dime.Scheduler, immediately updating the map in Dime.Scheduler which in turn allows the planners to better respond to planning requests.|
|TimeSlot Entries||Time slot entries can be sent from CRM to Dime.Scheduler, for instance to create a locked time slot on national or bank holidays as defined in the CRM Business Closure Calendar.|
To update data you have already sent to Dime.Scheduler simply sent the data from CRM again.
Developing a Send-plugin
Data is sent from CRM to Dime.Scheduler using plugins. Therefore, this data is sent automatically during creation, modification, and deletion of an entity in CRM, depending on the plugin registration process. The Dime.Scheduler Connector for Dynamics CRM comes with a number of pre-built plugins that support a number of standard tables or areas of CRM: Cases, Sales Orders, etc...
It is easy to extend or modify these plugins, to develop own plugins or integrate functions into other objects.
All functions that are required to send data to Dime.Scheduler can be found in the C# classes
To develop your own send plugin, make sure that the plugin class inherits the
DimePluginBase class. This is a base class that already handles most of the setup part and only executes when an active DS Connector Setup record is found. It also gives you a cached version of the Setup records in a DsConnectorSetup object.
It is advised to create custom send-plugins in the "Custom > SendPlugins" folder of the Visual Studio project provided with the CRM Connector. This will make it easier to merge you customizations when new versions of the CRM Connector are released.
A Send-plugin calls the Dime.Scheduler Web Service passing the necessary parameters and, when required, also sends Entity Filter Values. The Dime.Scheduler Web Service expects 3 parameters: the function to process the data, an array with parameter names and an array with the corresponding values.
A Send-plugin constructs and sends those 3 parameters in 4 steps:
Create a new instance of the DsWebserviceManagement class. It is required to pass the ConnectorSetup object to the default constructor.
(Optional) When it is required to transfer Document Filter Values then the current record’s EntityReference is passed to the TransferEntityFilterValues method of the DsWebserviceManagement instance.
The table to which the record belongs has to be setup in DS Entity Filter Values Sources Document Filter Values are the filter values defined for a Resource or Task.
Populate the parameter arrays:
Call the Parameters.Add function of the DsWebserviceManagement instance for each field that needs to be set. The AddParameter function requires 2 parameters: Key: the name of the field in Dime.Scheduler Value: the value for the field
Call the Dime.Scheduler Web Service:
Call the CallDimeSchedulerWS method of the DsWebserviceManagement instance. The CallDimeSchedulerWS function requires 1 parameter: StoredProcedureName: this is the name of the stored procedure or function that Dime.Scheduler will use to process the data. Shown below is an example of the plugin UpsertEquipmentToResource.cs which sends a CRM Resource (Facility/Equipment) to Dime.Scheduler that shows the 4 steps.
Calling a Send-plugin
To send data to Dime.Scheduler register the correct steps on the Send-plugins using the plugin registration tool.
The image below show the 2 sample plugins registered for sending tasks and equipment entities to Dime.Scheduler on create and update.
Make sure to include a Post Image of your entity for Update messages so that all values are available. For more information about using the Plugin Registration Tool, see here.