Using the request Object
From AgileApps Support Wiki
Revision as of 19:40, 11 January 2013 by imported>Aeric
To get all of the parameters available in the request object, and their values:
- <syntaxhighlight lang="java" enclose="div">
<%
String[] params = request.getParameterValues(); for (int i=0; i<params.length; i++) { String paramName = params[i]; String paramValue = request.getParameter( paramName ); }
%> </syntaxhighlight>
To obtain a record identifier from a request object sent by the platform:
- <syntaxhighlight lang="java" enclose="div">
<%
String object_id = request.getParameter("object_id"); String record_id = request.getParameter("record_id");
%> </syntaxhighlight>
To obtain a record identifier from a request object sent by a Custom Action button: A Custom Action button can be applied to one record, or to several records at one time, if the user took advantage of the More Actions feature in the record list view. Because it can be applied to more than one record at a time, the process for obtaining record IDs differs somewhat.
Here is the code that does the job:
- <syntaxhighlight lang="java" enclose="div">
<%
%> </syntaxhighlight>