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 a created record.
activityFeedCommentTabChanged
afterSaveEventThe event happens occurs after the form is savedthe comment tab in the Activity Feed widget has changed.
Return:
Type | Description |
---|---|
Object | This method returns a |
widget with the previous value and the current value of the tabs.
|
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('activityFeedCommentTabChanged', async (obj) => { const previousTab = obj.previousTab; }); |
afterLoadBreadcrumbs
The event occurs after the breadcrumbs are loaded.
Return:
Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Object | This method returns nodes URL.
|
|
|
|
|
|
|
|
|
|
|
|
Example:
Code Block | ||
---|---|---|
|
|
| |||
SimpleEventBus.on('afterLoadBreadcrumbs', async (obj) => {
const backUrl = obj.previousNode.url;
}); |
afterLoadWidgets
The event occurs when all widgets are loaded.
Return:
Type | Description |
---|---|
Boolean | The event returns a boolean value (true or false). |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterSaveEventafterLoadWidgets', async (obj) => { const savedRecordId = obj.payload.recordId;if (obj.name === 'active' && obj.isValid) { // do something } }); |
afterSaveEvent
The event happens occurs after the a form is saved and when the UI-actions are returned.
Return:
Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Object | This method returns a form object
|
|
|
|
|
|
|
|
|
or |
errors
|
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterSaveAndGetUiActionsEventafterSaveEvent', async (obj) => { const savedRecordId = obj.payload.recordId; }); |
afterSaveAndGetUiActionsEvent
The event happens after the breadcrumbs are loadedoccurs after a form is saved and when UI-actions are returned.
Return:
Type | Description |
---|---|
Object | This method returns a |
form object.
|
|
|
|
|
|
or an error.
|
|
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterLoadBreadcrumbsafterSaveAndGetUiActionsEvent', async (obj) => { const backUrlsavedRecordId = obj.previousNodepayload.urlrecordId; }); |
afterValidation
The event happens occurs after the widget field validation. It is used in combination with the Validation process validation event.
Return:
Type | Description |
---|---|
Boolean | The event returns |
a boolean value (true or false).
|
|
|
|
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.on('afterValidation', async (obj) => { if (obj.name === 'active' && obj.isValid) { ... } // do something } }); |
validation
The event happens when all widgets are loaded.calls the validation of fields.
Return:
Type | Description |
---|---|
BooleanList of fields | The event returns the boolean value (true or false)list of fields. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SimpleEventBus.onemit('afterLoadWidgetsvalidation', async (obj) => { if (obj.name === 'active' && obj.isValid) { ... // do something } }fields); |
Table of Contents | ||||||
---|---|---|---|---|---|---|
|