updateEvent
From LongJump Support Wiki
Revision as of 23:17, 20 December 2010 by imported>Aeric (Text replace - 'updateEvent(' to 'Functions.updateEvent(')
- Functions.updateEvent(String eventId, Parameters params)
- Updates an event with values in params.
Updates an event in the database. View the updated event in the 'Calendar' object.
In order to update an event, pass the ID of the event to the Functions.updateEvent() API.
When the event is added using the Functions.addEvent() API, retrieve the ID of the event using the Result class. Optionally, use Functions.searchRecords() API to retrieve the ID of the event.
In Data Policies, this API can only be used when the triggering action is 'Update'. Event records cannot be updated when the triggering action is 'Add'.
Syntax
Result = Functions.updateEvent(String eventID, Parameters params)
Parameters
- eventID
- The identifier of the event
- params
- Field-value pairs to update in the event
Return
- Example
- This example creates an instance of Parameters, adds a key to it, and calls updateEvent.
String eventID = ""; // Some code to retrieve the eventID of an existing event. // Following code adds description to the Event that has been created. Parameters params = Functions.getParametersInstance(); params.add("description", "Meeting for next Project with Acme Solutions. Address: 1111 Arguello Blvd. San Francisco, CA 93093"); Result updateEventResult = Functions.updateEvent(eventID, params);