Click or drag to resize

ISalePrivateToGroup Property

Which user group is the sale visible for? Sets Private=2 automatically. The confidentiality of sale is shown as different types of private on the sale. For an updated list of "private" types, see the database manual.

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
EPrivacyLevel – the objects private flag. (Public appointment, Private to UserGroup or Private to User)
Examples

Private

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

VB
Dim objSO
Dim result
Set objSO = CreateObject("SuperOffice.Application")
If not (objSO is nothing) Then
    Select case objSO.CurrentSale.Private
    Case 0
        MsgBox "This sale can be read by anyone.", vbInformation + vbOKOnly, "SuperCOM"
    Case 1
        MsgBox "This sale can only be read/seen by the owner", vbInformation + vbOKOnly, "SuperCOM"
    Case 2
        MsgBox "This sale can only be read by members in owning associates group/dept", vbInformation + vbOKOnly, "SuperCOM"
    Case else
        MsgBox "This type must be new, I have no information regarding this type of privacy on appointments.", vbInformation + vbOKOnly, "SuperCOM"
    end select
else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

Private to group

VB
Dim objDB
Dim msg

Set objDB = CreateObject("superofficedb.database")
If Not (objDB is Nothing) Then
    objDB.login "<userid>", "<password>" ' log in to the database

    Set mySale = objDB.GetSale(2) 'get sale with sale_id=2
    msg = msg & "Are all required fields filled: " & mySale.Sentry.AreAllRequiredFieldsFilled & vbCrLf
    msg = msg & "Appointment: " & mySale.Appointment.Description & vbCrLf
    msg = msg & "Group: " & mySale.Group.Text & vbCrLf
    msg = msg & "Private to group: " & mySale.PrivateToGroup.Id & vbCrLf
    msg = msg & "Publish type: " & mySale.PublishType & vbCrLf
    msg = msg & "Number of documents added to this sale =  " & mySale.ActivityLinks.Documents.Count & vbCrLf
    MsgBox msg, vbInformation, "SuperCOM"

Else
    MsgBox "unable to connect to database"
End If
Set objso = Nothing

See Also