Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Global events are used as a trigger that executes different client scripts. These scripts may call various actions, for example, to open the created record.
afterLoadBreadcrumbs
The event happens after the breadcrumbs are loaded.
Return:
Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Object | This method returns a __ object.
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterLoadBreadcrumbs', async (obj) => { const backUrl = obj.previousNode.url; }); |
afterLoadWidgets
The event happens when all widgets are loaded.
Return:
Type | Description |
---|---|
Boolean | The event returns the boolean value (true or false). |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterLoadWidgets', async (obj) => { if (obj.name === 'active' && obj.isValid) { ... // do something } }); |
afterSaveEvent
The event happens after the form is saved.
Return:
Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Object | This method returns a form object
or an error.
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterSaveEvent', async (obj) => { const savedRecordId = obj.payload.recordId; }); |
afterSaveAndGetUiActionsEventafterSaveAndGetUiActionsEvent
The event happens after the form is saved and when the UI-actions are returned.
Return:
Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Object | This method returns a form object
or an error.
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterSaveAndGetUiActionsEvent', async (obj) => { const savedRecordId = obj.payload.recordId; }); |
afterValidation
The event happens after the widget field validation. It is used in combination with the validation event.
Return:
Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Boolean | The event returns the boolean value (true or false).
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterValidation', async (obj) => { if (obj.name === 'active' && obj.isValid) { ... } }); |
validation
The event calls the validation of fields.
Return:
Type | Description |
---|---|
List of fields | The event returns the list of fields. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.emit('validation', fields); |
Table of Contents | ||||||
---|---|---|---|---|---|---|
|