Difference between revisions of "RequestParams Object"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:requestParams Object}} | {{DISPLAYTITLE:requestParams Object}} | ||
The <tt>requestParams</tt> object contains field-value pairs for the fields in the current object. | The <tt>requestParams</tt> object contains field-value pairs for the fields in the current object. An instance of the [[Parameters Class]], it is an implicit part of any Java code running in the platform, outside of a user-defined class. | ||
Use it to get the field values for the current object: | |||
:* When [[Data_Policies#Execute Java Code|Executing Java Code in a Data Policy]] | |||
:* When executing Java code in a JSP [[Page]] | |||
{{Note|You can see the fields defined for an object by selecting<br>'''Designer > Data > Objects > {object} > Fields'''.}} | |||
You can see the fields defined for an object by selecting '''Designer > Data > Objects > {object} > Fields'''. | |||
;Example:This example creates a task to make a call to a new account using the <tt>name</tt> field in the current object. | ;Example:This example creates a task to make a call to a new account using the <tt>name</tt> field in the current object. |
Revision as of 01:00, 13 October 2011
The requestParams object contains field-value pairs for the fields in the current object. An instance of the Parameters Class, it is an implicit part of any Java code running in the platform, outside of a user-defined class.
Use it to get the field values for the current object:
- When Executing Java Code in a Data Policy
- When executing Java code in a JSP Page
- Example
- This example creates a task to make a call to a new account using the name field in the current object.
String accountId = requestParams.get("id"); String accountName = requestParams.get("name"); Parameters params = Functions.getParametersInstance(); params.add("reference_id", "ACCOUNT"); params.add("reference_type", accountId); params.add("action_type", "Outbound Call"); params.add("status", "Not Started"); params.add("priority", "Normal"); params.add("description", "Call Account " + accountName + ". Welcome to Acme Solutions, introduction to our services and (optional) demo"); Functions.addTask("Welcome call to Account " + accountName, "03/12/2011", getEnv(ENV.USER.ID), params);