Difference between revisions of "Get a Record ID"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 16: | Line 16: | ||
::** Display the page source and search for the folder image: <tt>graphics/view.png</tt> | ::** Display the page source and search for the folder image: <tt>graphics/view.png</tt> | ||
:3. You are now positioned at an image tag that displays the folder icon. | :3. You are now positioned at an image tag that displays the folder icon. Examine the anchor tag that surrounds it (<tt><a></tt>). | ||
:4. The information you want is in <tt>href</tt> attribute, in a JavaScript call that looks like this: | |||
<blockquote> | <blockquote> | ||
<tt><nowiki><a href="javascript:lj_showDetailPane('...',</nowiki></tt><br> | <tt><nowiki><a href="javascript:lj_showDetailPane('...',</nowiki></tt><br> |
Revision as of 23:03, 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:
- Visit https://{domain}/networking/rest/record/{objectName}?fieldList=id&pageSize=1
The first record is returned. - Alternatively, add a Filter Expression to the URL to retrieve a specific record.
- In the XML response, use the content of the <id> tag.
- -or-
- 1. Go to an object view: Workspace > {object}
- In Chrome, or in Firefox with the FireBug plugin:
- Right click the folder icon and choose Inspect Element.
- Display the page source and search for the folder image: graphics/view.png
- In Chrome, or in Firefox with the FireBug plugin:
- 3. You are now positioned at an image tag that displays the folder icon. Examine the anchor tag that surrounds it (<a>).
- 4. The information you want is in href attribute, in a JavaScript 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. The id parameter contains the record ID. (It's the part after the equals sign.)