Events allow creating tasks for server-side script executing, immediate or scheduled, or notification sending at a specified point in time. These are the most common use cases of system events. You can also use one event register for both the needs listed above.
To use system events in your tasks, you need to create an event register record.
After this, you can handle it in one of these ways
To create an event, use the server-side API methods ss.eventQueue or ss.eventQueueScheduled. Create an event as described in the referenced articles. As a result, records in the Event (sys_event) table will be created.
You cannot create, edit, or delete records in the Events (sys_event) table manually. Only users with the admin role can read them. |
The example of such record is described below.
Role required: admin. |
Field | Description | |
---|---|---|
Name | The name of the record called from the Event Register (sys_event_register) table. | |
Instance | ID of the Record object. When creating an event via calling methods ss.eventQueue or ss.eventQueueScheduled, you have to pass on the Record object. The object ID will be saved in this field. You'll be able to call this value in the Event Script Action (sys_event_script_action) script body: event.instance | |
Table | This field contains a reference to the record table that was passed at the time the event was created. This field is populated automatically. | |
Process started at | The date and time of the system event execution start. As for scheduled events, this field is populated with the value passed by the third parameter of the ss.eventQueueScheduled method. The date and time of the Event (sys_event) script execution. | |
Process finished on | The date and time of the system event execution finish. | |
Param_1...Param_ 5 | The string parameters that can be transmitted to the specified Event (sys_event) record via the SimpleOne server-side API (ss.eventQueue and ss.eventQueueScheduled methods). | |
State | Event state:
| |
Processing duration, ms | System event processing duration (in milliseconds). | |
User | The script specified in the Event Script Action record will be executed with the permissions of this user, and the ACL restrictions will also be taken into account.
|
Related lists are bound with the event record containing the following lists:
Field | Description |
---|---|
Name | Name of the event register record. Events (the Event (sys_event) table records) called for this register will contain this value in the Name field. |
Table | Starts with only those events that contain a record related to a specified table. If you are going to trigger email sending with this record, then make sure that the value in the Table field in the Notification Rule record is the same as in this event register record. |
Description | Event register record description. |
Disable script logging | Select the checkbox to disable script execution logging (to the Script Logs (sys_log_script) table) when the related event starts up. |
Related lists area bound with the event register record containing the following lists:
Field | Description | ||
---|---|---|---|
Name | Name of the event script action. | ||
Event Register Record | The reference to the record in the Event Register (sys_event_register) table. | ||
Active | Select this checkbox to make the script action active or inactive. | ||
Execution order | Specify the event script action execution order if there is more than one record for the related Event Register (sys_event_register) table. Actions are executed in ascending order. | ||
Script | The script is executed when the event is fired.
|