Difference between revisions of "Record Id"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 13: | Line 13: | ||
{{Note|<br>This option is available only for views that have a sidebar.}} | {{Note|<br>This option is available only for views that have a sidebar.}} | ||
==Record | ==Get a Record ID Programmatically== | ||
* | Field values are stored in the <tt>Parameters</tt> object that is delivered to code that is running in the platform. | ||
:* 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. | |||
:* 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. | |||
;Considerations: | |||
*Record Identifier has a Range of: <tt>1 - 2,147,483,647</tt> | *Record Identifier has a Range of: <tt>1 - 2,147,483,647</tt> | ||
:*In most [[Objects]], the record identifier is formatted as an ''integer'' | :*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'' | |||
:::*[[User]] | |||
:::*[[Template]] | |||
*[[Lookup]] actions require that the field is formatted as a text | *[[Lookup]] actions require that the field is formatted as a text string. | ||
::To convert Record | ::To convert a 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 |
Revision as of 20:31, 12 June 2014
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.
Get a Record Identifier from the Platform UI
- Open the tab for the object of interest
- Click the down arrow next to the name of the current view ()
- Click [Edit]
- 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.) - Save the view
Get a Record ID Programmatically
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.
- Considerations
- Record Identifier has a Range of: 1 - 2,147,483,647
- In most Objects, the record identifier is formatted as an integer
- Lookup actions require that the field is formatted as a text string.
- To convert a Record ID to a string, use the CONCAT Formula Function:
CONCAT (id, '') where: id is a Record Identifier '' is two single quote (') characters
For Developers
Using the Developer Suite, Record Identifier can be requested from:
See Also