Get Delete Table Row Buttons Display State

Get Delete Table Row Buttons Display State - kintone.app.record.getDeleteTableRowButtonsDisplayState(fieldCode)

Retrieves the display state of the Delete this row buttons of the specified Table field.
This API retrieves the display state set by the Show or Hide Delete Table Row Buttons API.

Function

Desktop

kintone.app.record.getDeleteTableRowButtonsDisplayState(fieldCode)

Mobile

kintone.mobile.app.record.getDeleteTableRowButtonsDisplayState(fieldCode)

Parameters

Parameter Type Required Description
fieldCode String Yes The field code of the Table field to retrieve the display state for.

Returns

A Promise object.
When the Promise object is fulfilled, the display state of the Delete this row buttons can be retrieved.

Type Description
String The display state.
  • VISIBLE: The buttons are visible.
  • HIDDEN: The buttons are hidden.

Sample Code

The following code retrieves the display state of the Delete this row buttons of a Table field with the field code Table.
If the buttons are visible, the code hides them.

1
2
3
4
5
6
7
kintone.events.on(['app.record.create.show', 'app.record.edit.show'], async (event) => {
  const displayState = await kintone.app.record.getDeleteTableRowButtonsDisplayState('Table');
  if (displayState === 'VISIBLE') {
    await kintone.app.record.showDeleteTableRowButtons('Table', 'HIDDEN');
  }
  return event;
});

Available Pages

Desktop and Mobile

  • Record Create
  • Record Edit

Notes

The display state of a Table field and the display state of its Delete this row buttons are managed separately.
If the display state of the Delete this row buttons is set to VISIBLE, VISIBLE is returned even if the Table field is hidden.

The Delete this row button does not appear when the table has only one row.
Even in this case, this API returns the display state set by the Show or Hide Delete Table Row Buttons API.