Click or drag to resize

IDictionaryGetFieldId Method

maps 'person.contact_id' -> 1537 Return the internal fieldid from a database field, like Person.Concactid has fielded = 1537

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

Parameters

fieldname
Type: SystemString
String - the name of the field; "table.field"

Return Value

Type: Int32
Long – fieldID
Examples

GetFieldId

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