Click or drag to resize

IAppointmentSetDefaultsToDo Method

SetDefaults for a ToDo appointment. Has no start time. The user is able to define their own default types, priority and duration under View – Preference in the CRM 5 clients. Calling the setDefaults method will set these values on the appointment. The user is able to define their own default types, priority and duration under View Preference in the CRM 5 clients. Calling the SetDefaultsToDo method will set these values on the appointment as long as it is of type = ToDo

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

Set default values to appoinment

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

VB
Dim objSO 
Set objSO = CreateObject("SuperOffice.Application")
If not (objSO is nothing) Then
    objSO.CurrentAppointment.SetDefaults()
    msgbox "Take a look at the current appointment now, when you click OK the changes will be cancelled."
    objSO.CurrentAppointment.CancelChanges()          
else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

Set default on todo

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