Difference between revisions of "Get Object and Record ID from the Request Object"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
Line 1: Line 1:
__NOINDEX__
When a JSP [[Page]] is launched from a context that is associated with a  
When a JSP [[Page]] is launched from a context that is associated with a  
particular object record, the <tt>request</tt> object available in the JSP page
particular object record, the <tt>request</tt> object available in the JSP page
contains the identifiers needed to obtain additional information from the record, using either the [[REST API:record Resource|REST record Resource ]] or the [[Java_API:Record_Handling|Java record handling APIs]].
contains the identifiers needed to obtain additional information from the record, using either the [[REST API:record Resource|REST record Resource ]] or the [[Java_API:Record_Handling|Java record handling APIs]].


To obtain the object and record identifiers for the active record from the <tt>request</tt> object:
Use this code to obtain the object and record identifiers for the active record from the <tt>request</tt> object:
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
<%
<%
Line 10: Line 11:
%>
%>
</syntaxhighlight>
</syntaxhighlight>
{{Note|Although the <tt>object_id</tt> is alphanumeric, it can be used in any API that requires an object name.}}


''Learn more:'' [[Java_API:Support_Classes_and_Objects#request Object|request Object]]
''Learn more:'' [[Java_API:Support_Classes_and_Objects#request Object|request Object]]

Revision as of 01:52, 18 February 2012

When a JSP Page is launched from a context that is associated with a particular object record, the request object available in the JSP page contains the identifiers needed to obtain additional information from the record, using either the REST record Resource or the Java record handling APIs.

Use this code to obtain the object and record identifiers for the active record from the request object:

<%
  String object_id = request.getParameter("object_id");
  String record_id = request.getParameter("record_id");
%>

Notepad.png

Note: Although the object_id is alphanumeric, it can be used in any API that requires an object name.

Learn more: request Object