AgileApps Support Wiki Pre Release

Difference between revisions of "Get a Record ID"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 20: Line 20:
<blockquote>
<blockquote>
<tt><nowiki><a href="javascript:lj_showDetailPane('...',</nowiki>​</tt><br>
<tt><nowiki><a href="javascript:lj_showDetailPane('...',</nowiki>​</tt><br>
<tt><b>'Service?t=498&id={recordID}</b>&object_id=...&a=view&policyaction=view');"></tt><br>
<tt>'Service?t=498<b>&id={recordID}</b>&object_id=...&a=view&policyaction=view');"></tt><br>
&nbsp; &nbsp; &nbsp; <tt><nowiki><img border="0" title="Details " alt="Details" src="graphics/view.png"></nowiki>​</tt><br>
&nbsp; &nbsp; &nbsp; <tt><nowiki><img border="0" title="Details " alt="Details" src="graphics/view.png"></nowiki>​</tt><br>
<tt></a>​</tt>
<tt></a>​</tt>

Revision as of 22:55, 9 January 2012

Typically, record IDs are of interest to programmers, who get them in the return values of API calls. But it can also be desirable to get a known value for testing.

To get a record ID:

  1. Visit https://{domain}/networking/rest/record/{objectName}?fieldList=id&pageSize=1
    The first record is returned.
  2. Alternatively, add a Filter Expression to the URL to retrieve a specific record.
  3. In the XML response, use the content of the <id> tag.
-or-
1. Go to an object view: Designer > Data > Objects > {object}
2. Use your browser's page-inspection tools to examine one of the folder icons FolderIcon.png in the view:
  • In Chrome, or in Firefox with the FireBug plugin:
    • Right click the folder icon and choose Inspect Element.
  • In all browsers:
    • Display the page source and search for the folder image: graphics/view.png
3. You are now displaying a call that looks like this:

<a href="javascript:lj_showDetailPane('...',​
'Service?t=498&id={recordID}&object_id=...&a=view&policyaction=view');">
      <img border="0" title="Details " alt="Details" src="graphics/view.png">​
</a>​

4. Extract value of the record ID from the id= parameter.