Describes event utilities in the Javascript API.

sys.events

This package contains methods for management of custom events.

triggerEvent(event, data)

Triggers a custom event into the application that can be caught by any listener configured to listen a CUSTOM_EVENT with name equals to event parameter.

Parameters

Name Type Required Default 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()});
Back to top