お世話になります。
下記コードでボタンを設置して、指定したページへ同一タブで開くことが出来ました。
今回は指定したページを別のタブで開きたいと思い投稿させて頂きました。
onclickの部分を変更したらいいのかなと考えているのですが、
修正についてご教授頂きたく、お願いします。
(function() {
"use strict";
kintone.events.on('app.record.index.show', function(event) {
if (document.getElementById('my_index_button2') !== null) {
return;
}
var myIndexButton2 = document.createElement('button');
myIndexButton2.id = 'my_index_button2';
myIndexButton2.innerText = '〇〇へ移動';
myIndexButton2.style.height='48px';
myIndexButton2.style.marginLeft='8px';
myIndexButton2.style.border='1px';
myIndexButton2.style.borderStyle='solid';
myIndexButton2.style.borderColor='#e3e7e8';
myIndexButton2.style.backgroundColor='#f7f9fa';
myIndexButton2.style.color='#696969';
// ボタンクリック時の処理
myIndexButton2.onclick = function() {
location.href = "https://〇〇〇〇" ;
};
kintone.app.getHeaderMenuSpaceElement().appendChild(myIndexButton2);
});
})();