Click or drag to resize

IContactUDef Property

The user-defined fields on the contact

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SOUDefFields UDef { get; }

Property Value

Type: SOUDefFields
SOUdefFields collection of SOUdefField object
Examples

Udef

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

VB
dim soDB, udef, udefs, myContact
set soDB = CreateObject("SuperOfficeDB.Database")
enUDFTShortTextEdit = 2

If Not (soDB is Nothing) Then
    soDB.login  "USERID", "PASSWORD"
    set myContact = soDB.GetContact(2)
    set udefs = myContact.udef
    item = "The number of userdefined fields  defined on contact panel: " & udefs.count  & vbcrlf
    for each udef in udefs
        item = item & "lable = " & udef.label  & vbcrlf
    next
    msgbox item
    For Each udef In udefs
        If udef.fieldtype = enUDFTShortTextEdit Then
            udef.value = "We change the value"
        End If
    next

    myContact.Save 'calling this will also save any changes to the udef fields
else
    msgbox  "unable to connect to database"
end if

See Also