requestParams Object
From LongJump Support Wiki
Revision as of 23:37, 4 March 2011 by imported>Aeric (Text replace - 'Setup > Customize > ' to 'Designer > Data & Presentation > ')
The requestParams object contains field-value pairs for the fields in the current object. You can use requestParams to get the fields of the current object when Java code executes in a data policy action.
The requestParams object is implicit in any Java code in the platform.
The requestParams object is an instance of the Parameters Class.
You can see the fields defined for an object by selecting Designer > Data & Presentation > Objects > {object} > Fields.
- 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);