REST API:Field Type Reference

From AgileApps Support Wiki
Revision as of 21:29, 2 August 2013 by imported>Aeric

This table shows how to format data for each of the Field Display Types in a platform object, when using the REST API.

Field Display Types Description
Auto Number

n/a

Checkbox
  • Specify 1 for Yes/True, 0 for No/False
Currency

Specify a decimal value, with no currency symbol and no separators other than the decimal point.

Custom Control

n/a

Date

A date. See "Date time", below.

Date time

A date and time.

  • As Entered - The date/time is stored and displayed exactly as entered.
  • Convert to Local Date/Time - (Default) Value is presumed to be entered in user's local time zone. The value is converted to the System Time Zone for storage in the database. When displayed, it is converted the user's time zone.
Note:
These options are available for new fields in Custom Objects. They are not available for standard Date/Time fields (for example: modified_time) or for Date/Time fields in the System Objects. Those fields are always converted.
Dependent Picklist

n/a

Email Address

A string containing of the form {name}@{domain}.{type}. Example: friend@somewhere.com

File Field

To upload a file, use the ...

Formula

n/a

Global Picklist

Specify a picklist value.

Image Field

To upload an image file, use the ...

Lookup

Specify a record ID from the target object.

Multiple Checkboxes

A comma-separated list of checkbox values.

Multi Object Lookup

The format is objectName:recordID. For example: cases:12345678

Multi Select Picklist

(Multi Select Global Pick List)

A comma-separated list of picklist values.

Number

An integer from -2,147,483,646 to 2,147,483,647.

Number with decimals

A number with a decimal point (and no other separators). The number of decimal places is specified in the field definition.

Percentage

A decimal value in the range 0 to 1. The number of decimal places is specified in the field definition.

Phone/Fax

A string of digits, with or without formatting. (Formatting this supplied is preserved. For example, "123.456.7890". Digits entered without formatting are displayed in the default format:

  • 7 digits ("1234567") displays as "123-4567".
  • 10 digits "1234567890" displays as "(123) 456-7890".
  • 11 digits ("12345678901") displays 1-234-567-8901
Note:
If the string is longer than 11 digits, it is displayed as entered.
In that case, it's helpful to provide the desired formatting.
Picklist
  • Specify one of the picklist values.
  • When you select this type for an object field, a text area lets you enter values.
    • Enter the names of the values, one per line, in the order they will be displayed.
    • When the user makes a selection, the value that is stored is the text entered on that line. So:
      1. If you change the order later, existing values are not affected.
      2. If you remove an entry at a later date, or change the spelling of a value, existing records that have that value are not affected. Either clean up the object data, or take that possible value into account in your design for backward compatibility.
Radio Buttons

Specify one of the radio button values.

  • When you select this type for an object field, a text area lets you enter values.
    • Enter the names of the values, one per line, in the order they will be displayed.
    • When the user makes a selection, the value that is stored is the text entered on that line. So:
      1. If you change the order later, existing values are not affected.
      2. If you remove an entry at a later date, or change the spelling of a value, existing records that have that value are not affected. Either clean up the object data, or take that possible value into account in your design for backward compatibility.
Rich Text Area
  • A string containing text and a limited number of HTML tags:
    bold, italics, numbered lists, bullet lists, image tags
Text Area
  • A multi-line string that can contain alphanumerics (A-Z, a-z, 0-9) and special characters: / @ . - $ %
Text Field
  • A string containing a single line of text. Text can include alphanumerics (A-Z, a-z, 0-9) and special characters: / @ . - $ %
Time

A time. For example, "6:50 PM".

  • As Entered - The date/time is stored and displayed exactly as entered.
  • Convert to Local Date/Time - (Default) Value is presumed to be entered in user's local time zone. The value is converted to the System Time Zone for storage in the database. When displayed, it is converted the user's time zone.
Note:
These options are available for new fields in Custom Objects. They are not available for standard Date/Time fields (for example: modified_time) or for Date/Time fields in the System Objects. Those fields are always converted.
URL A string containing a web address. For example: http://yourCompany.com