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 form is savedthe comment tab in the Activity Feed widget has changed.

Return:

TypeDescription
Object

This method returns a

form object

widget with the previous value and the current value of the tabs.

Code Block
languagejs
themeEclipse
linenumberstrue
{
payload

	previousTab: 'previous',
	currentTab: 'current',
	widgetInstanceId: '10000001',
}


Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('activityFeedCommentTabChanged', async (obj) => {
  const previousTab = obj.previousTab;
});

afterLoadBreadcrumbs


The event occurs after the breadcrumbs are loaded.

Return:

TypeDescription
Object

This method returns nodes URL.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  'currentNode': {
view: 'default',

    
tableName
title: '
task
current Title',
    
recordId
url: '
1000000001',
/current',
  },
  'previousNode': {
    
displayValue
title: '
Test
previous 
Task
Title',
}

    
result
url: '
OK
/previous',
  }
}
or an error.


Example:

Code Block
languagejs
theme
title
Eclipse
on
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).
{payload{ errors: ['Text error'], } result: 'ERROR', }

Example:

Code Block
languagejs
titleon
linenumberstrue
SimpleEventBus.on('afterSaveEventafterLoadWidgets', async (obj) => {
  const savedRecordId = obj.payload.recordId;if (obj.name === 'active' && obj.isValid) {
    // do something
  }
});
afterSaveAndGetUiActionsEvent

afterSaveEvent


The event happens occurs after the a form is saved and when the 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
',
"
}

or

an error.

errors

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


Example:

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

afterSaveAndGetUiActionsEvent


The event happens after the breadcrumbs are loadedoccurs 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
{
  
'currentNode'
"payload": {
    "view": "Default",
    
title
"tableName": 
'current Title'
"task",
    "recordId": "166307559406494736",
   
url
 "displayValue": 
'/current',
""
  },
  
'previousNode':
"result": "OK"
}

or an error.

Code Block
languagejs
themeEclipse
linenumberstrue
{
  "payload": {
    
title: 'previous Title', url: '/previous'
"errors": [...]
  },
  
},
"result": "ERROR"
}


Example:

Code Block
languagejs
titleon
linenumberstrue
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:

TypeDescription
Boolean

The event returns

the

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
  }
});
afterLoadWidgets

validation


The event happens when all widgets are loaded.calls the validation of fields. 

Return:

TypeDescription
BooleanList of fieldsThe event returns the boolean value (true or false)list of fields.

Example:

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

}fields);


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse