Difference between revisions of "RequestParams Object"
From LongJump Support Wiki
imported>Aeric m (Text replace - 'Setup > Customize > ' to 'Designer > Data & Presentation > ') |
imported>Aeric m (Text replace - 'Designer > Data >' to 'Designer >') |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:requestParams Object}} | {{DISPLAYTITLE:requestParams Object}} | ||
The <tt>requestParams</tt> object contains | The <tt>requestParams</tt> object is available when [[Data_Policies#Execute Java Code|Executing Java Code in a Data Policy]]. It contains name/value pairs for the fields in the current record. It is an instance of the [[Parameters Class]]. | ||
{{Note|You can see the fields defined for an object by selecting<br>'''Designer > Objects > {object} > Fields'''.}} | |||
You can see the fields defined for an object by selecting '''Designer > | |||
;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. | ||
Line 29: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
<noinclude> | |||
[[Category:Support Classes and Objects]] | |||
</noinclude> |
Latest revision as of 23:35, 22 June 2012
The requestParams object is available when Executing Java Code in a Data Policy. It contains name/value pairs for the fields in the current record. It is an instance of the Parameters Class.
- 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);