logActivity
From LongJump Support Wiki
- Functions.logActivity(String subject, String objectId, String id, String activityByID, Parameters params)
- Logs an activity in a record; Logged activities appear in the Activity History section of Related Information.
The action performed by this API can be performed via the browser interface in Log Activity.
Syntax
Result = Functions.logActivity(String subject, String objectId, String recordId, String activityByID, Parameters params)
Parameters
- subject
- Subject of the activity; In the browser UI, the subject is the contents of the Notes field; This argument will populate the contents of the Notes field in the record, and replace any existing data in the field
- objectId
- Object identifier; Identifies the object this activity is related to; See Object Type Identifier
- id
- Record identifier; Identifies the record to be updated; The activity associated with this record is updated with Status set to Completed, and % Completed is set to 100%
- activityByID
- User identifier; The name of the user who has performed this activity
- params
- Other field-value pairs for the activity
Return
- Example
- This example creates an instance of Parameters and calls updateEvent.
Parameters params = Functions.getParametersInstance(); params.add("action_type", "Email"); Result result = Functions.logActivity("Call Primary contact", "ACCOUNT", requestParams.get("id"), Functions.getEnv(ENV.USER.ID), params);