sys.events
Describes event utilities in the Javascript API.
On this page
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
Name | Type | Required | Description |
---|---|---|---|
event | string | yes | The name of dispatched custom event. |
data | object | no | Map 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()});