Onload Event

Contents

Onload Event (desktop) - app.record.index.show

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

Function

app.record.index.show

Sample

1
2
3
4
5
kintone.events.on('app.record.index.show', function(event) {
  console.log(event);
  // Displays contents of event object in console
  // Record data is contained in event.records
});

Triggered Timing

  • After displaying the record list page
  • After displaying the record list page when clicking the Next or Previous arrow icons (the icons are displayed when all records cannot be fit into one page)
  • After sorting the record order when clicking the field titles on the record list page
  • After applying the filter settings on the record list page
  • After the category is changed on the record list page

Properties of the Event Object

PROPERTY TYPE DESCRIPTION
appId Number The App ID.
viewType String The type of the record list. Possible values are list, calendar, or custom.
viewId Number The View ID of the record list.
viewName String The View Name of the record list.
records Array or Object Differs depending on the viewType:
  • list: An array of record objects
  • calendar: An object including the date string as the key, and an array of record objects as the value
    A calendar example:
    {
    "2015-04-01": [record1, record2],
    "2015-04-20": [record1]
    }
  • custom with pagination enabled: An array of record objects
  • custom with pagination disabled: An empty array
offset Number Differs depending on the viewType:
  • list: The offset of the list
  • calendar: null
  • custom with pagination enabled: The offset of the list
  • custom with pagination disabled: 0
size Number Differs depending on the viewType:
  • list: The number of records in the list
  • calendar: null
  • custom with pagination enabled: The number of records in the list
  • custom with pagination disabled: 0
date String Differs depending on the viewType:
  • calendar: The month shown in the calendar view. April 2015 will be "2015-04"
  • All others: null
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.index.show

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

Function

mobile.app.record.index.show

Triggered Timing

  • After displaying the record list page
  • After displaying the record list page when clicking the Next or Previous arrow icons * Available only if the View Type is List View
  • After sorting the record order when clicking the field titles on the record list page * Available only if the View Type is List View
  • After the category is changed on the record list page * Available only if the View Type is List View

Properties of the Event Object

PROPERTY TYPE DESCRIPTION
appId Number The App ID.
viewId Number The View ID of the record list.
viewName String The View Name of the record list.
viewType String The type of view of the record list. *Available only if the View Type is List View or Custom View
records Array An array of record objects. *Available only if the View Type is List View or Custom View
offset Number The offset of the list. *Available only if the View Type is List View or Custom View
size Number The number of records in the list. *Available only if the View Type is List View or Custom View
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.