Difference between revisions of "UpdateEvent"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 13: | Line 13: | ||
'''Syntax''' | '''Syntax''' | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
Result = Functions.updateEvent(String eventID, Parameters params) | Result = Functions.updateEvent(String eventID, Parameters params) | ||
Line 23: | Line 22: | ||
'''Return''' | '''Return''' | ||
:[[Result Class|<tt>Result</tt> object]] | |||
[[Result Class|<tt>Result</tt> object]] | |||
;Example:This example creates an instance of <tt>Parameters</tt>, adds a key to it, and calls <tt>updateEvent</tt>. | ;Example:This example creates an instance of <tt>Parameters</tt>, adds a key to it, and calls <tt>updateEvent</tt>. | ||
Line 40: | Line 38: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
<noinclude> | |||
[[Category:Event and Task Management]] | |||
</noinclude> |
Latest revision as of 00:31, 14 December 2011
- 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);