Click or drag to resize

IAppointmentSave Method

Persist the object to the database. May throw an error if you are not allowed to save changes to the object. Saves the changes you made to the appointment model to the database, does not return the new data from the database

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void Save()

Implements

IModelBaseSave
Examples

Save Appointment

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

VB
Dim soDB, myAppnt
Set soDB = CreateObject("SuperOfficeDB.Database")
enTableTask = 67
enTablePriority = 79 


If soDB.Login ("USERNAME", "PASSWORD") then

Set myAppnt = sodb.CreateAppointment
myAppnt.SetDefaultsToDo
myAppnt.Alarm = True
myAppnt.AlarmOffset = 10
myAppnt.AllDayEvent = False
myAppnt.Completed = False
myAppnt.Contact = sodb.GetContact(sodb.OwnerContactId)
myAppnt.Description = "Remember to pick up cake for the meeting this evening"
myAppnt.DoBy = DateAdd("h", 4, Now)
myAppnt.Duration = 60
myAppnt.FreeBusy = enFreeBusyBusy
myAppnt.Task = sodb.GetListItemByName(enTableTask, "Private")
myAppnt.Priority = sodb.GetListItemByName(enTablePriority, "1 High")
myAppnt.Save
'If the CRM client is open, Refresh will make the new appointment appear
sodb.Refresh

Else
    MsgBox "Unable to log in"
End If

See Also