Skip to main content
These events fire on the record edit page. Use them to pre-populate fields, validate inputs before saving, and respond after an existing record is successfully updated.
Register all event handlers using kintone.events.on(). See Event handling for usage details.

Onload event

Triggered after the record edit page is displayed.
Event type: app.record.edit.showTriggered timing: After the record edit page is displayed.Event object properties:
PropertyTypeDescription
typeStringThe event type. Returns app.record.edit.show.
appIdNumberThe app ID.
recordIdNumberThe record ID.
recordObjectThe record data currently on the edit page.
Available actions: Return a Promise to wait for asynchronous operations before the page renders.
kintone.events.on('app.record.edit.show', function(event) {
  var record = event.record;

  // Lock a field if the record is in a certain status
  if (record.Status.value === 'Approved') {
    record.Budget.disabled = true;
  }

  return event;
});

Save event

Triggered when the Save button is clicked on the record edit page, before the data is sent to the server.
Event type: app.record.edit.submitEvent object properties:
PropertyTypeDescription
typeStringThe event type. Returns app.record.edit.submit.
appIdNumberThe app ID.
recordIdNumberThe record ID.
recordObjectThe record data entered by the user.
Canceling the save:You can cancel the save by doing one of the following:
  • Set a field error on event.record[fieldCode].error
  • Set a record error on event.error
  • Return false
Available actions:
  • Overwrite field values
  • Show field errors
  • Show record errors
  • Return a Promise to delay saving until asynchronous operations finish
kintone.events.on('app.record.edit.submit', function(event) {
  var record = event.record;

  // Enforce end date is after start date
  if (record.StartDate.value && record.EndDate.value) {
    if (record.EndDate.value < record.StartDate.value) {
      record.EndDate.error = 'End date must be after the start date.';
      return event;
    }
  }

  return event;
});

Save success event

Triggered after an existing record is successfully saved from the record edit page.
This event does not trigger if the record fails to save.
Event type: app.record.edit.submit.successEvent object properties:
PropertyTypeDescription
typeStringThe event type. Returns app.record.edit.submit.success.
appIdNumberThe app ID.
recordIdNumberThe record ID.
recordObjectThe record data of the saved record.
Available actions: Set event.url to redirect the user to a specific URL after saving.
kintone.events.on('app.record.edit.submit.success', function(event) {
  var record = event.record;
  console.log('Record updated at:', record.Updated_datetime.value);
  return event;
});

Field change event

Triggered when the value of a specified field changes on the record edit page. Replace (fieldcode) with the actual field code of the target field. Supported field types:
  • Single-line text (triggers when the field loses focus or a lookup copies a value)
  • Number (triggers when the field loses focus or a lookup copies a value)
  • Radio button
  • Check box
  • Multi-choice
  • Drop-down
  • Date
  • Time
  • Date and time
  • User selection
  • Department selection
  • Group selection
  • Rich text
  • Subtable (for changes within subtable rows)
Event type: app.record.edit.change.(fieldcode)Event object properties:
PropertyTypeDescription
typeStringThe event type. Returns app.record.edit.change.(fieldcode).
appIdNumberThe app ID.
recordIdNumberThe record ID.
recordObjectThe record data at the time the field changed.
changesObjectData about the changed field and row.
changes.fieldObjectThe changed field object.
changes.rowObject or nullThe subtable row that contains the changed field, or null if outside a subtable.
Available actions:
  • Overwrite field values
  • Enable or disable field editing
  • Show field errors
  • Show record errors
  • Return a Promise to wait for asynchronous operations
kintone.events.on('app.record.edit.change.Country', function(event) {
  var record = event.record;

  // Reset the region field when country changes
  record.Region.value = '';

  return event;
});

Build docs developers (and LLMs) love