Record Details Events
Onload Event (desktop)app.record.detail.show
Function
Triggered Timing
- After displaying the record details page.
Note that this also includes timings such as:- when viewing the record details page through notifications
- after displaying the next record by clicking the "next" and "previous" icons
- after clicking "Save" or "Cancel" on the record edit page
- after the status of the process management has been proceeded
Properties of the Event Object
PROPERTY | TYPE | DESCRIPTION |
---|---|---|
appId | Number | The App ID. |
record | Object | The record object. |
recordId | Number | The record ID. |
type | String | The event type. |
Available Event Object Actions
By returning a kintone.Promise object in the event handler, the next operations can be processed after waiting for asynchronous processes in the event handler to finish.
Onload Event (mobile)mobile.app.record.detail.show
Function
Triggered Timing
- After displaying the record details page.
Note that this also includes timings such as:- after clicking "Save" or "Cancel" on the record edit page
- after the status of the process management has been proceeded
Properties of the Event Object
PROPERTY | TYPE | DESCRIPTION |
---|---|---|
appId | Number | The App ID. |
record | Object | The record object. |
recordId | Number | The record ID. |
type | String | The event type. |
Available Event Object Actions
By returning a kintone.Promise object in the event handler, the next operations can be processed after waiting for asynchronous processes in the event handler to finish.
Delete Submit Eventapp.record.detail.delete.submit
Function
Desktop
Mobile
PROPERTY | TYPE | DESCRIPTION |
---|---|---|
appId | Number | The App ID. |
record | Object | The record object. |
recordId | Number | The record ID. |
type | String | The event type. |
Running actions after waiting for asynchronous operations to finish
By returning a kintone.Promise object, you can delete the record after waiting for asynchronous operations to finish. Refer to the sample code for the "When Clicking the Save Button" event on the Record Create page.
Available Event Object Actions
None
Notes
- If false is returned, the deletion will be cancelled.
Proceed Process Event app.record.detail.process.proceed
Running actions after waiting for asynchronous operations to finish
By returning a kintone.Promise object, you can update the status of the record after waiting for asynchronous operations to finish. Refer to the sample code for the "When Clicking the Save Button" event on the Record Create page.
Notes
- Some processes need several assignees to perform an action before moving onto the next status - this event will take place even when the status does not change.
- The record data can be updated by returning the event object.
- Actions can be cancelled by returning false.
- Actions can be cancelled including an error message, by setting an error property in the event object and returning it. The string in the error property will be displayed as an error message.
- Actions will be canceled with an error, if an invalid value is returned.
- If nothing is returned, only the status will be updated
Function
Desktop
Mobile
PROPERTY | TYPE | DESCRIPTION |
---|---|---|
action | Object | The action that was run.
// The key of the object |
status | Object | The status before the update
// The key of the object {value:"status_name"} |
nextStatus | Object | The status after the update
// The key of the object Note that the status after the update is retrieved even if the status does not change after the action. |
record | Object | The record object |
type | String | The event type. |
Available Event Object Actions
Limitations
Refer to the Limitations section of the Event Handling page.
Event Object Actions
It is possible to perform actions such as disabling a field or displaying an error on a field by changing the properties of the event object and returning it. This section explains the available actions.
Overwrite field values
If the event handler overwrites values in the fields of the record object and returns the event object, the fields of the record are updated with those values in the object.
Sample
When the process has progressed, overwrite the field "text_0" with a specified string, overwrite the first line of the table "Table", and add values into "text_in_table" and "number_in_table" that are inside a table, as a new line.
Note that when adding a new row to the table, all fields in the table must be specified, and the type of each field must also be specified.
Fields that cannot be Overwritten
Even if the below fields are overwritten in the handler and returned, they will not take effect on the record itself.
- Calculated
- The Field Mappings targets of the Lookup field
- Attachment
Notes
- If an empty string is specified for the radio button field, the default value of the field will be inputted.
- Values of the fields can be overwritten, even if the editing of the field has been disabled.
- If you do not have permission to add values to a particular field, the field change written in the script will not take effect for that field.
- If the handler does not return the event object, the fields will not be updated.
- If there are several handlers, the returned values from the last handler will take effect.