skip to main content
Querying data stores with SQL : Supported data types : SugarCRM data types
  

Try Now

SugarCRM data types

SugarCRM is implemented as a series of modules. When built, each module supports a set of data types. In addition, through the user interface, users can add tables that look and act like modules. Creating some fields triggers the creation of other fields that use different data types. For example, adding an "Address" adds extra columns for the components of an address, but does not create a column of type "Address".
Modules can also add their own custom data types. Data types that are not included in the following table are treated as strings (VARCHAR(255)). All data types, both those added from the user interface as well as those in the existing and user-created modules, are exposed through the SugarCRM metadata. Therefore, all are exposed as SQL tables.
The drop-down that the users select from has different names for some of these data types. Beginning with SugarCRM version 6.5, the set of supported data types changed. Existing modules may have references to data types that aren't visible from the user interface.
Table 170. Supported data types
Drop-down
Metaschema name
SQL type
Notes
Address
--
VARCHAR
Creates four more text fields for the address components. The field names are the name entered plus "_city", "_state", and "_country", as type "varchar(100)", and "_postalcode", which is "varchar(20)".
--
assigned_user_name
VARCHAR
Cannot be created via UI.
Checkbox
bool
BIT
Has three values: "":"", 1:"Yes", 2:"No". The default value is either checked or unchecked only.
Currency
currency
DECIMAL
The first time this is created in the record, a currency_id field of type currency_id is also created.
--
currency_id
VARCHAR
Created as a side-effect of creating the first currency column. It is always named "currency_id".
Date
date
DATE
Default values include:yesterday, today, tomorrow, next week, next monday, next friday, two weeks, next month, first day of next month, three months, six months, next year
--
datetime
TIMESTAMP
Cannot be created via UI.
Datetime
datetimecombo
TIMESTAMP
Defaults include those for date, and optional times. In addition for time, the hours 01-12:00,15,30,45:am/pm.
Decimal
decimal
DECIMAL
Dropdown
enum
VARCHAR
--
email
VARCHAR
Cannot be created via UI.
Encrypt
encrypt
VARCHAR
Cannot be created via UI.
File
file
LONGVARCHAR
Float
float
FLOAT
Equivalent to Java Double.
--
fullname
VARCHAR
This is a concatenation of the two name components first_name and last_name.
--
function
LONGVARCHAR
Cannot be created directly using the UI.
HTML
html
LONGVARCHAR
--
id
LONGVARCHAR
Cannot be created directly using the UI.
IFrame
iframe
VARCHAR
Image
image
VARCHAR
Integer
int
INTEGER
--
json
LONGVARCHAR
Cannot be created directly using the UI.
--
link
VARCHAR
--
long
BIGINT
Cannot be created directly using the UI.
--
longtext
LONGVARCHAR
--
modified_user_name
VARCHAR
Cannot be created directly using the UI.
Multiselect
multienum
VARCHAR
Returned as comma-separated values.
--
name
VARCHAR
Cannot be created directly with the UI.
--
none
If the metadata returns a data type of "none", the column is ignored.
Parent
parent
VARCHAR
Supports the SugarCRM "Flex Relate" feature, which allows the type of the link target to be set dynamically at runtime.
--
parent_type
VARCHAR
Supports the SugarCRM "Flex Relate" feature, which allows the type of the link target to be set dynamically at runtime.
Password
password
VARCHAR
PHONE
phone
VARCHAR
Radio
radioenum
VARCHAR
Relate
relate
VARCHAR
--
short
INTEGER
Cannot be created using the UI.
--
string
VARCHAR
Cannot be created using the UI.
--
team_list
VARCHAR
Cannot be created using the UI.
Textarea
text
VARCHAR
TextField
varchar
VARCHAR
Time
time
TIME
TimePeriod
timeperiod
VARCHAR
Cannot be created directly with the UI.
URL
url
VARCHAR
--
user_name
VARCHAR