Toggle Sidebar

Toggle Sidebar

Toggles the sidebar state of the current record, such as displaying or hiding comments and history..

Function

Desktop

kintone.app.record.showSideBar(state)

Parameters

Parameter Type Required Description
state String Yes The sidebar state
  • OPEN: opens the sidebar
  • CLOSED: closes the sidebar
  • COMMENTS: displays the comments
  • HISTORY: displays the history

Returns

A Promise object.
When the Promise object is fulfilled, no value is returned.

Available Pages (Desktop)

  • Record details
  • Record edit

Sample

1
2
3
4
// Open the comment tab
kintone.events.on('app.record.edit.show', async (event) => {
  await kintone.app.record.showSideBar('COMMENTS');
});

Limitations

When specifying OPEN:

  • If both the comments and the history tab exist, the comments tab will open.
  • If the Enable comments setting is disabled in the App settings, the history tab will open.
  • If both are disabled, nothing will happen.