IScriptingEventsOnAppointmentDeleted Method |
Namespace: SuperOffice.COM.ScriptEvents
Description
This text may be copied to the notepad, and saved as a *.vbs file.
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