AgileApps Support Wiki Pre Release

Difference between revisions of "Record Id"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
{{DISPLAYTITLE:recordID}}  
{{DISPLAYTITLE:recordID}}  
==About Record IDs==
Each record has a unique identifier, which is the key to accessing and updating data. Record Identifiers are typically not displayed in Views or Reports, however, some users (and developers, especially) find it useful to know the value of the Record Identifier. In [[API]]s and [[Expressions#Formula_Expressions|Formula Expressions]], Record Identifier can appear as: <tt>id,  record_id, or recordId</tt>, depending on the tool.  
Each record has a unique identifier, which is the key to accessing and updating data. Record Identifiers are typically not displayed in Views or Reports, however, some users (and developers, especially) find it useful to know the value of the Record Identifier. In [[API]]s and [[Expressions#Formula_Expressions|Formula Expressions]], Record Identifier can appear as: <tt>id,  record_id, or recordId</tt>, depending on the tool.  


The Record Identifier is contained in a field like any other, and can be displayed from a [[View]] or a [[Report]].  
The Record Identifier is contained in a field like any other, and can be displayed from a [[View]] or a [[Report]].  
''See also:''
:*[[Object Type Identifier]]
:*[[Session Identifier]]


==Get a Record Identifier from the Platform UI==
==Get a Record Identifier from the Platform UI==
Line 14: Line 19:


==Get a Record ID Programmatically==
==Get a Record ID Programmatically==
Record IDs can be obtained using:
:*[[Record_Handling#Identifying_Objects_and_Records|Java API]]
:*[[REST_API#Identifying_Objects_and_Records|REST API]]


In the REST APIs, the record ID is stored in the <tt>id</tt> field.
'''To get a record ID using the Java APIs:'''
Field values are stored in the <tt>Parameters</tt> object that is delivered to code that is running in the platform.  
Field values are stored in the <tt>Parameters</tt> object that is delivered to code that is running in the platform.  


Line 35: Line 46:
           '' is two single quote (') characters</nowiki></pre>
           '' is two single quote (') characters</nowiki></pre>
|}
|}
==For Developers==
Using the [[Developer Suite]], Record Identifier can be requested from:
:*[[Record_Handling#Identifying_Objects_and_Records|Java API]]
:*[[REST_API#Identifying_Objects_and_Records|REST API]]
==See Also==
:*[[Object Type Identifier]]
:*[[Session Identifier]]
<noinclude>
<noinclude>


[[Category:Glossary]]
[[Category:Glossary]]
</noinclude>
</noinclude>

Revision as of 20:40, 12 June 2014

About Record IDs

Each record has a unique identifier, which is the key to accessing and updating data. Record Identifiers are typically not displayed in Views or Reports, however, some users (and developers, especially) find it useful to know the value of the Record Identifier. In APIs and Formula Expressions, Record Identifier can appear as: id, record_id, or recordId, depending on the tool.

The Record Identifier is contained in a field like any other, and can be displayed from a View or a Report.

See also:

Get a Record Identifier from the Platform UI

  1. Open the tab for the object of interest
  2. Click the down arrow next to the name of the current view (DownArrowIcon.png)
  3. Click [Edit]
  4. In the Fields tab, select the ID field in the Available Fields list, and move it to the Selected Fields list.
    (Each selected field becomes a column in the resulting view.)
  5. Save the view

Notepad.png

Note:
This option is available only for views that have a sidebar.

Get a Record ID Programmatically

Record IDs can be obtained using:

In the REST APIs, the record ID is stored in the id field.

To get a record ID using the Java APIs: Field values are stored in the Parameters object that is delivered to code that is running in the platform.

  • To get the ID of the record in that object, use the get method on that object, specifying 'id' as the name field to get.
  • A field of type Lookup stores the Record ID for the object it points to. To retrieve the record ID it contains, use the get specifying 'field _name' (the name of the field, in single quotes) as the field to get.
Considerations
  • Record Identifier has a Range of: 1 - 2,147,483,647
  • In most Objects, the record id is an integer
  • Exception:In these objects, the record ID is a text string:
  • Lookup fields require a string value.
To convert a numeric Record ID to a string, use the CONCAT Formula Function:
CONCAT (id, '')
    where: 
          id is a Record Identifier
          '' is two single quote (') characters