Fired when the user is about to drop a new appointment, but before the appointment drops.
Parameters
Parameter | Description |
---|---|
EntityID | ID of the entity where the new appointment is starting |
StartDateTime | The date and time where the dragging will start |
EndDateTime | The new end date & time |
ApptToCopy | The appointment to copy, if any |
Remarks
The BeforeNewApptDrop event fires when the user is about to drop a new appointment but before the drop actually occurs. This event gives the developer the opportunity to decide if the new appointment should be dropped at the given location. To cancel the dragging operation, simply set the Cancel property to 1.
The EntityID parameter is the unique ID of the entity to which the new appointment might be added. The StartDateTime and EndDateTime parameters contain the new appointment's intended start and end times respectfully. Both parameters are in OI's internal DT format. The ApptToCopy will be set to "" if the user is creating a brand new appointment. If the user is CTRL+Dragging an existing appointment, then ApptToCopy will be the key of the appointment that will need to be copied. The actual creation of the new appointment should be performed during the AfterNewApptDrop event.
Cancelling this event using the Cancel property currently has no effect because developers are responsible for acutally adding the appointment anyways. See the AfterNewApptDrop event. Still, this event is made available for possible future enhancements. For now, use only the AfterNewApptDrop.
Example
Transfer Param1 to EntityID Transfer Param2 to StartDateTime Transfer Param3 to EndDateTime // Don't allow users to create appointments longer than 4 hours If CalcApptTime(StartDateTime, EndDateTime) GT 4 then Set_Property(CtrlEntId, "OLE.Cancel", Yes$) end
See Also
BeforeNewApptDrag, AfterNewApptDrop, Cancel, CancelNewApptDrag