Click or drag to resize

IAppointmentPrivateToGroup Property

The group this appointment is visible for when Private = group. The confidentiality of appointments is shown as different types of private on the appointment

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
IListTextItem PrivateToGroup { get; set; }

Property Value

Type: IListTextItem
Long – the objects private flag. (Public appointment, Private to UserGroup or Private to User) IListTextItem - The group this appointment is visible for
Examples

Get private flag

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 ("USERID", "PASSWORD") then

    Set myAppnt = sodb.CreateAppointment
    myAppnt.Alarm = True
    myAppnt.AlarmOffset = 10
    myAppnt.AllDayEvent = False
    myAppnt.Associate = soDB.GetAssociate(soDB.UserAssociateId)
    myAppnt.Completed = False
    myAppnt.Contact = soDB.GetContact(soDB.OwnerContactId)
    myAppnt.Description = "Strawberrys for all - summer pep talk"
    myAppnt.DoBy = #6/1/2007 12:00:00 PM#
    myAppnt.Duration = 60
    myAppnt.FreeBusy = enFreeBusyBusy
    myAppnt.Task = soDB.GetListItemByName(enTableTask, "Meeting (Internal)")
    myAppnt.Priority = soDB.GetListItemByName(enTablePriority, "1 High")
    myAppnt.Location = "Meeting room"
    myAppnt.Private = 0 'public appointment, everyone can see
    myAppnt.Project = soDB.GetProject(2)
    For Each assoc In soDB.GetAssociateList

        myAppnt.AddParticipant assoc

    Next



    If myAppnt.Sentry.AreAllRequiredFieldsFilled = True Then
        myAppnt.Save

        msg = msg & "Appointment saved with appointment_id = " & myAppnt.Identity & vbCrLf
        msg = msg & "Appointment is created by " & myAppnt.CreatedAssociate.FullName & vbCrLf
        msg = msg & "and belongs to usergroup " & myAppnt.Group.Text & vbCrLf
        If myAppnt.UpdatedDate > #1/1/1970# Then
            msg = msg & "Appointment was last updated by: " & myAppnt.UpdatedAssociate.FullName & " at " & myAppnt.UpdatedDate
        Else
            msg = msg & "Appointment has never been updated"
        End If

        MsgBox msg
    End If



Else
    MsgBox "Unable to log in"
End If

PrivateToGroup

VB
dim db
Dim appnt, msg
Set db = CreateObject("SuperOfficedb.Database")
if db.login("<username>","<password>") then    

    set appnt = db.GetAppointment(458)
    msg = "Description:" & appnt.Description & vbcrlf
    msg = msg & "Appointment Owner: " & appnt.Associate.LoginName & vbcrlf
    msg = msg & "Assigned by: " & appnt.AssignedBy & vbcrlf
    msg = msg & "PrivateToGroup: " & appnt.PrivateToGroup.Id  & vbcrlf
    msg = msg & "RecurrenceRuleId: " & appnt.RecurrenceRuleId & vbcrlf
    msg = msg & "Location: " & appnt.Location & vbcrlf
    msg = msg & "AllDayEvent: " & appnt.AllDayEvent & vbcrlf
    msg = msg & "FreeBusy: " & appnt.FreeBusy & vbcrlf
    msg = msg & "Group: " & appnt.Group.Id & vbcrlf
    msg = msg & "RejectCounter: " & appnt.RejectCounter & vbcrlf
    msg = msg & "RejectReason: " & appnt.RejectReason & vbcrlf
    msg = msg & "Emailid: " & appnt.Emailid & vbcrlf
    msg = msg & "AssignedBy: " & appnt.AssignedBy & vbcrlf
    msg = msg & "PublishType: " & appnt.PublishType & vbcrlf
    msg = msg & "IsRecurring: " & appnt.IsRecurring & vbcrlf
    msg = msg & "Leadtime: " & appnt.LeadTime & vbcrlf
    msg = msg & "UpdateMode: " & appnt.UpdateMode & vbcrlf

    msgbox (msg)
else
    MsgBox "Could not log on"
end if
Set objSO = Nothing

See Also