Click or drag to resize

IDictionaryGetFieldName Method

maps 1537 -> 'contact_id' Will return the fieldname from the internal fieldId provided, meaning NAME if you ask to get the fieldname of the field 1281 (Contact.Name)

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
string GetFieldName(
	int FieldId
)

Parameters

FieldId
Type: SystemInt32
Long - FieldId

Return Value

Type: String
String - the name of the field
Examples

GetFieldName

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

VB
Dim objDB
Set objDB = CreateObject("SuperOfficeDB.Database")
If Not (objDB is Nothing) Then
    objDB.Login "<USERNAME>", "<PASSWORD>"   ' Log in to the database 
    msg = msg & "Contact.name fieldId= " & objDB.Dictionary.GetFieldId("contact.name") & vbCrLf
    msg = msg & "Contact.name field length= " & objDB.Dictionary.GetFieldLength(1281) & vbCrLf
    msg = msg & "FieldName of fieldid 1281= " & objDB.Dictionary.GetFieldName(1281) & vbCrLf
    msg = msg & "FieldType of fieldid 1281= " & objDB.Dictionary.GetFieldType(1281) & vbCrLf
    msg = msg & "FullName of fieldid 1281= " & objDB.Dictionary.GetFullName(1281) & vbCrLf
    msg = msg & "TableID of fieldid 1281= " & objDB.Dictionary.GetTableIdFromFieldId(1281) & vbCrLf
    msg = msg & "Tablename of fieldid 1281= " & objDB.Dictionary.GetTableName(1281) & vbCrLf
    msg = msg & "Dictionary revision= " & objDB.Dictionary.Revision & vbCrLf
    msg = msg & "Dictionary version= " & objDB.Dictionary.Version & vbCrLf
    msgbox msg, vbInformation + vbOkOnly, "SODictionary"
else
    MsgBox "Unable to connect to database"
end if

See Also