Difference between revisions of "Record Id"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:recordID}}  
{{DISPLAYTITLE:recordID}}  
Each record has a unique identifier, which is the key to accessing or updating data and moving records through workflows. 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.  
A record ID is a unique value used to access and update data. Record IDs can appear as: <tt>id,  record_id, or recordId</tt>, depending on the tool. The record ID is used in [[API]]s and some [[Expressions#Formula_Expressions|Formula Expressions]].  


The Record Identifier is contained in a field like any other, and can be displayed from a [[View]] or a [[Report]].  
Typically, the record ID is stored in a record's <tt>id</tt> field. Those fields generally are not displayed in common [[Views]] or [[Reports]].
<noinclude>
:''See also:''
::*[[Object Type Identifier]]
::*[[Session Identifier]]
</noinclude>


==Find Record Identifier from the Web Browser==
==Get a Record ID Programmatically==
#Open the object of interest
Record IDs can be obtained using:
#Click the [[View Icon]] and select '''Edit this View'''
:*[[Record_Handling#Identifying_Objects_and_Records|Java API]]
# In the Fields tab, select the Record Identifier from the Available Fields list, and move it to the Selected Fields list
:*[[REST_API#Identifying_Objects_and_Records|REST API]]
#*Each selected field becomes a column in the resulting view
#:[[File:recordid.gif|none|thumb]]
#Save the view


==Record Identifier and Lookup Actions==
In the REST APIs, the record ID is stored in the <tt>id</tt> field.


*The Record Identifier of any field that is of type [[Lookup]] can be retrieved by using the '''[[Java API#get|get]]''' method of the Parameter class with 'Field Name' as the parameter
'''To get a record ID using the Java APIs:'''
*Record Identifier has a Range of: <tt>1 - 2,147,483,647</tt>
Field values are stored in the <tt>Parameters</tt> object that is delivered to code that is running in the platform.
:*In most [[Objects]], the record identifier is formatted as an ''integer''
 
::;Exception:In the following objects, the record identifier is formatted as a text ''string''
:* To get the ID of the record in that object, use the '''[[Java API#get|get]]''' method on that object, specifying <tt>'id'<tt> as the name field to get.
::::*[[User]]
 
::::*[[Template]]
:* A field of type [[Lookup]] stores the Record ID for the object it points to. To retrieve the record ID it contains, use the '''[[Java API#get|get]]''' specifying <tt>'field _name'</tt> (the name of the field, in single quotes) as the field to get.
::::*[[Document]]
 
*[[Lookup]] actions require that the field is formatted as a text ''string''
;Considerations:
::To convert Record Identifier to ''string'' format, use the [[CONCAT]] Formula Function:
:*Record Identifier has a Range of: <tt>1 - 2,147,483,647</tt>
:*In most [[Objects]], the record id is an integer
:*'''Exception:'''In these objects, the record ID is a text string:
::*[[User]]
::*[[Template]]
:*[[Lookup]] fields require a string value.
::To convert a numeric Record ID to a string, use the [[CONCAT]] Formula Function:
::{| border="0" cellpadding="0" cellspacing="0"  
::{| border="0" cellpadding="0" cellspacing="0"  
|<pre><nowiki>CONCAT (id, '')
|<pre><nowiki>CONCAT (id, '')
     where:  
     where:  
           id is a Record Identifier
           id is a Record Identifier
           '' is two single quote (') characters</nowiki></pre>
           '' is two single quote (') characters</nowiki></pre>
|}
|}
<noinclude>


==About Field Names==
[[Category:Glossary]]
[[Field Name]]s are listed in the Fields tab of an [[Object]].
</noinclude>
 
:[[Image:fieldslist.gif|none|thumb]]
 
==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>[[Category:Glossary]]</noinclude>

Latest revision as of 09:01, 4 April 2017

A record ID is a unique value used to access and update data. Record IDs can appear as: id, record_id, or recordId, depending on the tool. The record ID is used in APIs and some Formula Expressions.

Typically, the record ID is stored in a record's id field. Those fields generally are not displayed in common Views or Reports.

See also:


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