- Home [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]
- Getting started
- Use cases
-
API
-
Object types
- DispositionType
- ProcessInstanceState
- ProcessTaskState
- ApplicationItemRegistration
- ApplicationProjectItem
- ApplicationProjectItemRef
- ApplicationProjectPlanElementItem
- ApplicationProjectPlanElementItemRef
- BaseApplicationItem
- BaseApplicationItemRef
- BaseItem
- BaseItemData
- CurrentUserItem
- DirectoryData
- DirectoryItem
- EmployeeItemData
- EmployeeItemParams
- EmployeeItemProcesses
- FileData
- FileItem
- FileItemRef
- FileVersionData
- FileVersionItem
- ImageData
- ImageItem
- ImageItemRef
- InstanceAddr
- Item
- ItemData
- ItemRef
- MailMessageData
- MailMessageItem
- MailMessageItemRef
- OrganisationStructureData
- OrganisationStructureItem
- OrganisationStructureItemRef
- ParamsItem
- ProcessInstanceData
- ProcessInstanceItem
- ProcessInstanceItemRef
- ProcessTaskData
- ProcessTaskItem
- ProcessTaskItemRef
- ProcessTemplate
- ProcessTimer
- ReminderData
- ReminderItem
- ReplacementData
- ReplacementItem
- StatusHistoryData
- StatusHistoryItem
- StatusHistoryItemRef
- TaskItemExit
- UserData
- UserGroupData
- UserGroupItem
- UserGroupItemRef
- UserItem
- UserItemRef
- ApplicationItem
- ApplicationItemRef
- Data types
- 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
-
Object types
Reminder object
To create a reminder for a task, the
ProcessTaskItem.createReminder
method.// Get the task object let task = await System. processes._searchTasks().where(x => x.__id.eq(taskUUID)).first(); // If the task object is not found, stop the script execution if (!task) { return; } // Get the current user const user = await System.users. getCurrentUser(); // Get the current date and add one day to it // The time zone is taken from the `System.timezones.current`field let dateReminder = new Datetime(); dateReminder = dateReminder.add(new Duration( 1, 'days')) // Create a reminder for the task on the next day await task. createReminder(dateReminder, user);
Type parameters
I: Item<ItemData>
Hierarchy
Properties
Readonly code
App code of the URL’s target (the app’s code).
Readonly data
Values of object’s fields.
Readonly fields
Description of the object’s fields.
Readonly id
ID of the URL’s target.
Readonly namespace
Namespace of the URL target (the code of the workspace that the app belongs to).
Methods
delete
Delete a reminder.
In the example, a task search is performed, reminders for the current user are retrieved, and all reminders are deleted:
// Get the task object let task = await System.processes._searchTasks().where(x => x. __id.eq(taskUUID)).first(); //If the task object is not found, stop the script execution if (!task) { return; } // Get the current user const user = await System.users.getCurrentUser(); // Get the current date // The time zone is taken from the field `System.timezones.current` let dateReminder = new Datetime(); // Get all reminders for the user for this task const reminders = await System.reminders.search().where((f,g) => g.and(f .user.eq(user), f.__item.eq(task!))).all(); // Delete all reminders for ( let i = 0; i < reminders.length; i++) { await reminders[i].delete(); }
Returns Promise<void>
fetch
Request complete data of a reference object.
Returns Promise<ReminderItem>
normalize
Delete duplicate data in arrays.
The method deletes duplicates in fields that store arrays of links to system objects (users, files, app items, or documents). For example, you can call this method after bulk editing data within an object.
const app1 = await Context.data.app1.fetch(); const app2 = await Context.data.app2 .fetch(); app1.data.executors.push(app2.data.executors); app1.normalize(); // Now we need to go over the elements in the new array app1.data.executors .forEach( ... );
Returns void
Properties
Methods