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.

afterLoadBreadcrumbs


The event occurs after the breadcrumbs are loaded.

Return:

TypeDescription
Object

This method returns nodes URL.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  
'currentNode': {
    title: 'current Title',
    
url: '/current',
  
},
  
'previousNode': {
    title: 'previous Title',
    url: '/previous',
  
}
,

}


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('afterLoadWidgets', async (obj) => {
    if (obj.name === 'active' && obj.isValid) {
		...    // do something
		}   }

});

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'
"Default",
    "tableName": 
'
"task
'
",
    "recordId": 
'1000000001'
"166307559406494736",
    "displayValue": ""
 
'Test
 
Task'
},
}
  
"result": 
'
"OK
',
"
}

or

an error.

errors

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


Example:

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

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'
"Default",
    "tableName": 
'
"task
'
",
    "recordId": 
'1000000001'
"166307559406494736",
    "displayValue": 
'Test Task', } result: 'OK',
""
  },
  "result": "OK"
}

or an error.

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


Example:

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

afterValidation


The event occurs after the widget field validation. It is used in combination with the validation event.

Return:

TypeDescription
Boolean

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

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


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterValidation', 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