Click or drag to resize

IScriptingEventsOnAppointmentDeleted Method

Identity is the id of the current object. It's to late to get any information other than the old appointment_id at this time.

Namespace:  SuperOffice.COM.ScriptEvents
Assembly:  Scripting.Interop (in Scripting.Interop.dll) Version: 8.0.0.0
Syntax
void OnAppointmentDeleted(
	int identity
)

Parameters

identity
Type: SystemInt32
appointment_id
Examples

Description

This text may be copied to the notepad, and saved as a *.vbs file.

VB
Sub OnAppointmentDeleted(apntId)

    Set myProjects = Database.Find.ProjectsByName("Deleted - warnings")
    set myProject = myProjects.GetFirst
    If myProjects.EOF Then
        'No contact exist, create it.
        Set myProject = Database.CreateProject
        myProject.SetDefaults
        myProject.Name = "Deleted - warnings"
        myProject.Save
    End If

    Set soApnt = Database.CreateAppointment
    soApnt.SetDefaults
    soApnt.Contact = currentcontact
    soApnt.Project = myProject
    soApnt.Description = Now() & "Appointment_id= " & apntId & ": " &  currentappointment.descripton & vbcrlf & "***** Was deleted *****"
    soApnt.Save

    if apntId = 123 then
        SOMessagebox "The appointment with appointment_id=123 is deleted"
    end if

End Sub

See Also