Record Details Event

Record Details Events

Onload Event (desktop)app.record.detail.show

An event triggered after the record details page is displayed on the desktop.

Function

app.record.detail.show

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 reloading the record details page

Properties of the Event Object

PROPERTY TYPE DESCRIPTION
appId Number The App ID.
record Object The record object.
recordId Number The record ID.

Possible Actions

Onload Event (mobile)mobile.app.record.detail.show

An event triggered after the record details page is displayed on the mobile.

Function

mobile.app.record.detail.show

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 reloading the record details page

Properties of the Event Object

PROPERTY TYPE DESCRIPTION
appId Number The App ID.
record Object The record object.
recordId Number The record ID.

Possible Actions

Delete Submit Eventapp.record.detail.delete.submit

An event triggered when the "Delete" button is clicked on the pop-up that appears when you delete a record on the record details page.

Function

app.record.detail.delete.submit
PROPERTY TYPE DESCRIPTION
appId Number The App ID.
record Object The record object.
recordId Number The record ID.

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.

Notes

  • If false is returned, the deletion will be cancelled.

Proceed Process Event app.record.detail.process.proceed

An event triggered when the "Update Status" is clicked for the business process feature.

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 preform 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

app.record.detail.process.proceed
PROPERTY TYPE DESCRIPTION
action Object The action that was run.
// The key of the object 
{value:"action_name"}
				
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 
{value:"status_name"}
				

Note that the status after the update is retrieved even if the status does not change after the action.
record Object The record object

Event Limitations

The below events are only available on the Desktop, and not on the mobile:

Available Actions

Show/Hide fieldskintone.app.record.setFieldShown()

Changes fields to be hidden or shown. For the second parameter, "false" makes a field hidden, and "true" makes a field shown.

Function

Desktop

kintone.app.record.setFieldShown("fieldcode","true/false")

Mobile

kintone.mobile.app.record.setFieldShown("fieldcode","true/false")

Sample

Hiding a field with a field code of "singleline_text0" on the record details page.

kintone.events.on('app.record.detail.show', function(event){
	kintone.app.record.setFieldShown('singleline_text0', false);
});

The below fields cannot be hidden:

  • Label
  • Border
  • Blank space
  • Fields inside tables
Was this article helpful?
0 out of 0 found this helpful
Comments
Please sign in to leave a comment.