- API
- Data types
- Getting started [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Manage types
- Global context and isolation
- Manage apps
- Batch actions with app items
- Manage external services
- Scripts in widgets
- Web components
- Access permissions
- Getting started with processes
- Getting started with signatures
- Getting started with file previews
- Getting started with the organizational chart
- Getting started with users and groups
-
Getting started with the
Table data type -
Getting started with the
Category data type - Dynamic event type calculation
- Typical use cases
-
API
- Object types
-
Data types
- AccountType
- DynamicFieldType
- EmailType
- NotificationType
- OrganisationStructureItemType
- PhoneType
- ReplacementType
- ServiceStatus
- UserStatus
- WatermarkPages
- WatermarkPosition
- AccountFieldTyped
- AccountFieldVoid
- ActiveNotification
- ApplicationField
- ApplicationTypeField
- ApplicationTypeFieldData
- Cell
- ClientEventField
- CookieOptions
- DatetimeFieldData
- DynamicBindingField
- DynamicBindingFields
- EnumField
- ErrorArgs
- ErrorObject
- FileField
- FloatFieldData
- GroupStatusField
- HttpResponse
- ImageField
- Language
- MailMessageAddress
- MailMessageAttachment
- MoneyFieldData
- Navigator
- NotificationOptions
- Page
- ParseSpreadsheetOptions
- ParseSpreadsheetResponse
- RefItem
- RefItemField
- RefItemFieldData
- RefItemFilterClosure
- ReportField
- ReportRef
- Role
- RoleField
- Row
- ServiceStatusInfo
- StaticApplicationFieldData
- StatusField
- TAccount
- TApplicationType
- TClientEvent
- TDate
- TDatetime
- TDuration
- TEmail
- TEnum
- TFullName
- TMoney
- TPhone
- TReport
- TStatus
- TTable
- TTime
- TTimezone
- TTimezones
- TableField
- UserField
- UserFieldData
- ValidationResult
- Watermark
- WidgetRefWithValues
- ReplacementTypeEnumBase
- RoleType
- TApplication
- TBoolean
- TCategory
- TDirectory
- TFile
- TFloat
- TImage
- TJSON
- TLink
- TOAuth2
- TRole
- TString
- TUser
- TableCellChangeDoneEvent
- TableCellChangeDoneEvents
- TableCellChangeEvent
- TableCellChangeEvents
- TableRowDeleteEvent
- TableRowDeleteEvents
- TableRowMoveEvent
- TableRowMoveEvents
- Global constants
- Work with apps
- Web requests
- Access permissions
- Document flow
- Live Chats
- “Code” widget
- Signatures
- Business calendars
- Integration with IP telephony
- Integration with email marketing services
- Company configuration metadata
- Activity stream metadata
Data types
Read more in the article about data types.
Type aliases
ReplacementTypeEnumBase
Substitution types
RoleType
Types of objects in Role type fields
TApplication
Link to app item
TBoolean
Yes/No Switch
To learn more, visit MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/ Global_Objects/Boolean.
TCategory
Category (Folder)
Link to an app item category. For the files structure or an app’s folder hierarchy, it’s a link to a folder.
TDirectory
Directory
TFile
Link to file
TFloat
Number
To learn more, visit [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/ Global_Objects/Number).
TImage
Image
TJSON
Arbitrary type (JSON)
This type is used to pass or store arbitrary data in the context.
Context.data.json = { 'my-string': 'string data', 'my- num': 1234, 'my-bool': true, 'my-array': [ 'string', 999, false ], 'my-object': { // You can use a nested object here as well } };Note that if you use this type in a serializable context ( for example, in the server context of a widget), its value can only be of JSON basic data types. However, it is possible to use this type to pass arbitrary values between widgets on the client side using binding of incoming variables.
// Widget 1 (external) async function onInit() { Context.data.json = { onSaveCallback: async () => await saveFunction() // Writing the link to the function }; } async function saveFunction() { // Event processing logic } // Widget 2 (internal) async function onSaveClick() { await Context.data.in_json?. onSaveCallback?.(); }TLink
Link (URL)
The type is used as a plain string. It is not validated.
Context.data.site_url = 'https://elma365.com/en/';TOAuth2
Link to OAuth2
TRole
Role link
TString
String
To learn more, visit [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/ Global_Objects/String).
TUser
User
TableCellChangeDoneEvent
Table cell edit completion event
TableCellChangeDoneEvents
Table cell edit completion event
Represents an array of objects with the following fields:
currentValue— current cell value;rootRowIndex— root table row index;rootColumnCode— root table column code;subTableRowIndex— nested table row index;subTableColumnCode— nested table column code. Usage example:const table = Context.data.clients_table; for (const event of events) { // Check if changes occurred in the nested table if (event.subTableColumnCode) { // Check if changes were made in the column with the `client` code if (event.subTableColumnCode === 'client') { const clientRef = event.currentValue; // type `UserItemRef` const clientApp = await clientRef.fetch(); // type `UserItem` // Change the value of the cell in the `client_phone` column in the same nested table row // based on the new value of the `client` cell const rootRow = table[event.rootRowIndex]; const subTable = rootRow[event.rootColumnCode]; const subTableRow = subTable [event.subTableRowIndex]; subTableRow.client_phone = clientApp.data.mobilePhone; return; } } else { // Changes occurred in the root table // ... } } Context.data.clients_table = table;TableCellChangeEvent
Table cell change event
TableCellChangeEvents
Table cell change event
Represents an array of objects with the following fields:
previousValue— the previous value of the cell;currentValue— the current value of the cell;rootRowIndex— the index of the root table row;rootColumnCode— the code of the root table column;subTableRowIndex— the index of the nested table row;subTableColumnCode— the code of the nested table column. Usage example:const table = Context.data.clients_table; for (const event of events) { // Check that the changes occurred in the nested table if (event.subTableColumnCode) { // Check that the changes were in the column with the code `client` if (event.subTableColumnCode === 'client') { const clientRef = event.currentValue; // type `UserItemRef` const clientApp = await clientRef.fetch(); // type `UserItem` // Change the value of the cell in the `client_phone` column in the same nested table row // based on the new value of the `client` cell const rootRow = table[event.rootRowIndex]; const subTable = rootRow[event.rootColumnCode]; const subTableRow = subTable [event.subTableRowIndex]; subTableRow.client_phone = clientApp.data.mobilePhone; continue; } } else { // Changes occurred in the root table // ... } } Context.data.clients_table = table;TableRowDeleteEvent
Table row deletion event
TableRowDeleteEvents
Table row deletion event
Represents an array of objects with the following fields:
row— deleted row;currentValue— current cell value;rootRowIndex— root table row index;rootColumnCode— root table column code;subTableRowIndex— subtable row index. Usage example:for (const event of events) { // Check that changes occurred in the subtable if (event.rootColumnCode) { // Check that the changes were in the column with code `products_table` if (event.rootColumnCode === 'products_table') { const deletedRow = event.row; const productRef = deletedRow.product; const productApp = await productRef.fetch(); // Perform additional logic based on the data from the deleted row console.log(`Row with product ${productApp.data.__name} has been deleted!`); continue; } } else { // Changes occurred in the root table // ... } }TableRowMoveEvent
Table row move event
TableRowMoveEvents
Table row move event
Represents an array of objects with the following fields:
row— the moved row;oldRootRowIndex— previous index of the root table row;newRootRowIndex— new index of the root table row;rootColumnCode— code of the root table column;oldSubTableRowIndex— previous index of the nested table row;newSubTableRowIndex— new index of the nested table row. Usage example:const table = Context.data.clients_table; for (const event of events) { // Check that changes occurred in the nested table if (event.rootColumnCode) { // Check that changes were in the column with the code `products_table` if (event.rootColumnCode === 'products_table') { const movedRow = event.row; const productRef = movedRow.product; const productApp = await productRef.fetch(); // Further side logic based on the data from the moved row console.log (`The row with the product ${productApp.data.__name} has been moved!`); continue; } } else { // Changes occurred in the root table // ... } } Context.data.clients_table = table;Enumerations
Interfaces
Type aliases
Feedback sent successfully
Thank you for your input