UDefField Table (146)

Definition table for user-defined fields; one row in this table corresponds to one generation of one field. The user defined fields that are in use, and earlier versions of user defined fields. ColumnId refers to the field type; see UDXXXSmall or UDXXXLarge for the referring ID. Preferences prefsection=‘System’, prefkey=‘CurrentUdefVersioncontact’ (or CurrentUdefVersionperson, project, sale), gives you the current version of user defined fields. prefkey=‘AdminUdefVersion<…>’ gives you the current version that’s being edited. If Current version = admin version, no editing has been done since the last Publish of user defined field was performed.

Fields

NameDescriptionTypeNull
UDefField_IdPrimary keyPK
ownerTable_idID of owning table (contact, person, project) - this is not the actual tableNumber, rather it’s an enumUShort
tabOrderTab order value, sets the field processing sequenceUShort
fieldTypeField type: 0 = leadtext only, 1 = Edit, 2 = CheckBox, 3 = dropdown, 4 = listboxUShort
listTableIdThe table ID of the source table for lists: kTableAssoc, kTableContInt or whateverTableNumber
UDListDefinition_idList to use for populating dropdown or listboxFK UDListDefinition
columnIdThe ID of the database column this field corresponds toFieldId
textLengthLength (in characters) of a text field, 0 for other typesUShort
fieldDefaultOptional default value for String fieldsString(254)
indexedIs this field indexed? 0 if no, index no. if yesBool
mandatory0 = no, 1 = yes (field must be filled out)Bool
readOnly0 = read/write, 1 = readonly (don’t combine with mandatory 8-) )UShort
tooltipOptional tooltip text for this fieldString(254)
fieldLabelThe label (lead text)String(254)
labelLeftX pixel coordinate of labelUShort
labelTopY pixel coordinate of labelUShort
labelWidthlabel width in pixels, 0 = ‘enough’ (from font)UShort
labelHeightlabel height in pixels, 0 = ‘enough’ (from font)UShort
fieldLeftX pixel coordinate of fieldUShort
fieldTopY pixel coordinate of fieldUShort
fieldWidthfield width in pixels, 0 = ‘enough’ (from font)UShort
fieldHeightfield height in pixels, 0 = ‘enough’ (from font)UShort
versionDefinition version number; ALL fields get new version whenever layout is updated.UShort
lastVersionIdUDefFieldId this field had in the previous version, 0 = field is new in this versionFK UDefField
page1LineNoLine no on View Page 1, used if MDO flags are OFF. 0 = this field is not visible on page 1UShort
registeredRegistered whenUtcDateTime
registered_associate_idRegistered by whomFK associate
updatedLast updated whenUtcDateTime
updated_associate_idLast updated by whomFK associate
updatedCountNumber of updates made to this recordUShort
udefIdentityUnique number used to track field identity across layout changesId
hideLabelHide the label if 1Bool
justificationJustification - 0 = default, left, right, centerEnum UdefJustification
progIdProgrammatic ID, for use by software that needs to find a particular field. Carried over like udefIdentity across generations. Use a Company.Product.Field format to avoid naming conflicts; the Company name SuperOffice is reserved.String(254)
formatMaskFormatting mask, can be whatever the controls understand (currently nothing :-))String(254)
shortLabelShort name to be used in Archive headings and on page 1. If blank, the fieldLabel will be used everywhere.String(254)

UDefField table relationship diagram

Version

The UDefField table contains many versions of the same field. When you publish a new udef field layout, a new version is created.

The version that is currently used by the SOCRM client is stored in a user preference.

OwnerTable

UDefField contains an ownerTable ID, which table is this user defined field for.

This field is an enum, unlike all other owner Table IDs in the database. It does not use the table ID listed in the dictionary.

  • UDefContact = 7
  • UDefPerson = 8
  • UDefProject = 9
  • UDefSale = 10
  • UDefTemp = 11
  • UDefAppointment = 12
  • UDefDocument = 13

FieldType

  • 1 = Number
  • 2 = Short text (up to 39 chars long)
  • 3 = Long text  ( 40 to 200 chars long)
  • 4 = Date (for dates 1970 - 2036, stored as Long value)
  • 5 = Unlimited date (for dates 0001 - 9999, stored as string)
  • 6 = Check box (stored as 0/1 in long field)
  • 7 = Drop-down (listtableid determines which list. If listTableId = 136 then this is a user-defined list and all items are stored in the UDList table with UDList.UDListDefinition_ID = udeffield.UDListDefinition_id)
  • 8 = Decimal  - actually double - that is 80 bits IEEE floating point.

ProgId

The Prog-id can be used to tag fields that are used by your application with a known value, so that you can easily find the udef fields you need. This may also be set from the Admin client. Must be unique per version+ownertable

Indexes

FieldsTypesDescription
UDefField_IdPKClustered, Unique
ownerTable_idUShortIndex

Relationships

TableDescription
associateEmployees, resources and other users - except for External persons
textLong text fields from all over the system
UDefFieldDefinition table for user-defined fields; one row in this table corresponds to one generation of one field. The user defined fields that are in use, and earlier versions of user defined fields. ColumnId refers to the field type; see UDXXXSmall or UDXXXLarge for the referring ID. Preferences prefsection=‘System’, prefkey=‘CurrentUdefVersioncontact’ (or CurrentUdefVersionperson, project, sale), gives you the current version of user defined fields. prefkey=‘AdminUdefVersion<…>’ gives you the current version that’s being edited. If Current version = admin version, no editing has been done since the last Publish of user defined field was performed.
UDefFieldGLUser group link table for UDefField, for MDO item hiding
UDListDefinitionList table that contains the list of user-defined lists, as well as system-defined lists. The list items are stored in the UDList table.

Replication Flags

  • Replicate changes DOWN from central to satellites and travellers.
  • Copy to satellite and travel prototypes.

Security Flags

  • Sentry controls access to items in this table using user’s Role and data rights matrix.