sforce logo

Field


In the DescribeSObjectResult, the fields property contains an array of Field objects. Each field represents a field in an sforce API object. The array contains only the fields that the user can view, as defined by the user's field-level security settings.

Name
Type
Description
autonumber
boolean
Indicates whether this field is an autonumber field (true) or not (false). Analogous to a SQL IDENTITY type, autonumber fields are read only, non-createable text fields with a maximum length of 30 characters. Autonumber fields are read-only fields used to provide a unique ID that is independent of the internal object ID (such as a purchase order number or invoice number). Autonumber fields are configured entirely in the salesforce.com user interface. The sforce API provides access to this attribute so that client applications can determine whether a given field is an autonumber field.
byteLength
int
For variable-length fields (including binary fields), the maximum size of the field, in bytes.
createable
boolean
Indicates whether the field can be created (True) or not (False). If True, then this field value can be set in a create call.
custom
boolean
Indicates whether the field is a custom field (True) or not (False).
defaultedOnCreate
boolean
Indicates whether this field is defaulted when created (true) or not (false). If True, then salesforce.com implicitly assigns a value for this field when the object is created, even if a value for this field is not passed in on the create call. For example, in the Opportunity object, the Probability field has this attribute because its value is derived from the Stage field. Similarly, the Owner has this attribute on most objects because its value is derived from the current user (if the Owner field is not specified).
digits
int
For fields of type integer. Maximum number of digits. The sforce Web service returns an error if an integer value exceeds the number of digits.
filterable
boolean
Indicates whether the field is filterable (True) or not (False). If True, then this field can be specified in the WHERE clause of a query string in a query call.
label
string
Text label that is displayed next to the field in the salesforce.com user interface. This label can be localized.
length
int
For string fields, the maximum size of the field in Unicode characters (not bytes).
name
string
Field name used in sforce API calls, such as create, delete, and query.
nameField
boolean
Indicates whether this field is a name field (True) or not (False). Used to identify the name field for standard objects (such as AccountName for an Account object) and custom objects. Limited to one per entity, except where FirstName and LastName fields are used (such as in the Contact object).
nillable
boolean
Indicates whether the field is nillable (True) or not (False). A nillable field can have empty content. A non-nillable field must have a value in order for the object to be created or saved.
picklistValues
Provides the list of valid values for the picklist. Specified only if restrictedPicklist is True.
precision
int
For fields of type double. Maximum number of digits that can be stored, including all numbers to the left and to the right of the decimal point (but excluding the decimal point character).
referenceTo
string[]
For fields that refer to other objects, this array indicates the objects of the referenced objects.
restrictedPicklist
boolean
Indicates whether the field is a restricted pick list (True) or not (False).
scale
int
For fields of type double. Number of digits to the right of the decimal point. The sforce Web service silently truncates any extra digits to the right of the decimal point, but it returns a fault response if the number has too many digits to the left of the decimal point.
selectable
boolean
Indicates whether the field is selectable (True) or not (False). If True, then this field can be specified in the list of fields of a query string in a query call.
soapType
See SOAPType for a list of allowable values.
type
See FieldType for a list of allowable values.
updateable
boolean
Indicates whether the field is updateable (True) or not (False). If True, then this field value can be set in a update call.


© Copyright 2000-2003 SalesForce.com, Inc.
All rights reserved • Various trademarks held by their respective owners.