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

afterSaveEvent


The event happens occurs after the savingcomment tab in the Activity Feed widget has changed.

Return:

TypeDescription
Object

This method returns a widget with the previous value and the current value of the tabs.

Code Block
languagejs
themeEclipse
linenumberstrue
{
	previousTab: 'previous',
	currentTab: 'current',
	widgetInstanceId: '10000001',
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterSaveEventactivityFeedCommentTabChanged', async (obj) => {
  const savedRecordIdpreviousTab = obj.payload.recordIdpreviousTab;
});
afterSaveAndGetUiActionsEvent

afterLoadBreadcrumbs


The event happens occurs after the saving and when the UI-actions are returned breadcrumbs are loaded.

Return:

TypeDescription
Object

This method returns nodes URL.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  'currentNode': {
    
view
title: '
default
current Title',
    
tableName
url: '
task
/current',
  },
  
recordId
'previousNode': 
'1000000001',
{
    
displayValue
title: '
Test
previous 
Task
Title',
    
result
url: '
OK
/previous'
,
} или { errors: ['Text error'], result: 'ERROR' , }
  }
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterLoadBreadcrumbs', async (obj) => {
  const backUrl = obj.previousNode.url; 
});

afterLoadWidgets


The event occurs when all widgets are loaded.

Return:

TypeDescription
BooleanThe event returns a boolean value (true or false).

Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterSaveAndGetUiActionsEventafterLoadWidgets', async (obj) => {
  if (obj.name === 'active' && obj.isValid) {
    // do something
  }
});
afterLoadBreadcrumbs

afterSaveEvent


The event occurs after a form is saved.

Return:

TypeDescription
Object

This method returns a form object

Code Block
languagejs
themeEclipse
linenumberstrue
{
  "payload": {
    "view": "Default",
    "tableName": "task",
    "recordId": "166307559406494736",
    "displayValue": ""
  },
  "result": "OK"
}

or errors

Code Block
languagejs
themeEclipse
linenumberstrue
{
  "payload": {
    "errors": [...]
  },
  "result": "ERROR"
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterLoadBreadcrumbsafterSaveEvent', async (obj) => {
  const savedRecordId = obj.payload.recordId;
});
afterValidation

afterSaveAndGetUiActionsEvent


The event occurs after a form is saved and when UI-actions are returned.

Return:

TypeDescription
Object

This method returns a form object.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  "payload": {
    "view": "Default",
    "tableName": "task",
    "recordId": "166307559406494736",
    "displayValue": ""
  },
  "result": "OK"
}

or an error.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  "payload": {
    "errors": [...]
  },
  "result": "ERROR"
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterValidationafterSaveAndGetUiActionsEvent', async (obj) => {
  const savedRecordId = obj.payload.recordId; 
});
afterLoadWidgets

afterValidation


The event happens when all widgets are loadedoccurs after the widget field validation. It is used in combination with the validation event.

Return:

TypeDescription
Boolean
This returns false .

The event returns a boolean value (true or false).

Code Block
languagejs
themeEclipse
linenumberstrue
{
  name: 'active',
  isValid: true,
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterLoadWidgetsafterValidation', async (obj) => {
  if (obj.name === 'active' && obj.isValid) {
    // do something
  }
});

validation


The event calls the validation of fields. 

Return:

TypeDescription
List of fieldsThe event returns the list of fields.

Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.emit('validation', fields);


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse