sys.events

Describes event utilities in the Javascript API.

sys.events

The sys.events package encompasses methods intended for the administration of custom events.

triggerEvent(event,data)

This method initiates a custom event within the application, which can be captured by any listener set up to monitor a CUSTOM_EVENT with a name matching the event parameter.

Parameters
NameTypeRequiredDescription
eventstringyesThe name of dispatched custom event.
dataobjectnoMap of properties that will be sent as data of event.
Samples
// trigger `newNote` event with id of record
sys.events.triggerEvent('newNote', {noteId: record.id()});