LoginSignup
5
2

More than 5 years have passed since last update.

kintoneでスペースにボタンを追加し、クリックでレコードを更新する

Last updated at Posted at 2017-01-29

kintoneに「スペース」要素を追加し、そこにボタンを表示させてクリック時に特定のレコードを更新する処理です。

kintone.events.on('app.record.create.show', function(e) {
    var record = e.record;

    /* ボタンの作成 */
    var button = document.createElement('button');
    button.innerHTML = 'click me';
    button.addEventListener('click', function() {
        var record = kintone.app.record.get();
        record['record']['xxx']['value'] = 'click the button!';
        kintone.app.record.set(record);
    });
    kintone.app.record.getSpaceElement('xxxx').appendChild(button);
});
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2