Click or drag to resize

IAppointmentAssignTo Method

Assign appointment to an associate, from another associate (default from current associate)

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void AssignTo(
	SOAssociate ToAssociate,
	SOAssociate FromAssociate = null
)

Parameters

ToAssociate
Type: SuperOffice.COM.SuperOfficeDBSOAssociate
The associate you want to assign this appointment to
FromAssociate (Optional)
Type: SuperOffice.COM.SuperOfficeDBSOAssociate
The associate who assigns this appointment to someone else
Examples

AssignTo

VB
Dim soDB, myAppnt 
Set soDB = CreateObject("SuperOfficeDB.Database")
e
If not (soDB is nothing) Then

    soDB.Login "USERNAME", "PASSWORD"

    Set myAppnt = soDB.CreateAppointment
    myAppnt.SetDefaults
    'set company to owner contact
    myAppnt.Contact = soDB.GetContact(soDB.OwnerContactId)
    'assign the appointment to associate with associate_id = 23
    myAppnt.AssignTo soDB.GetAssociate(23), soDB.GetAssociate(soDB.Database.UserAssociateId)
    'set timezone to UTC/GMT
    myAppnt.TimeZoneLocationId = 2

    If myAppnt.Sentry.AreAllRequiredFieldsFilled Then
        myAppnt.Save
    End If

else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

See Also