スペースに指定したIDにjavascriptでURLを書き込み詳細画面でクリックしてひらきたい

何を実現したいのかを書きましょう

題名とおなじになってしまいますが、
スペースに指定したIDにjavascriptでURLを書き込み詳細画面でクリックしてひらきたいです。

発生した問題やエラーメッセージを具体的に書きましょう

スペースに書き込みは行いましたが、クリックできるリンクにならずにおります。

実行したコードをコピー&ペーストしましょう

kintone.events.on('app.record.detail.show', function(event) {
    var record = event.record;
    var number = record['番号'].value;
    const space = kintone.app.record.getSpaceElement('space');

    const message = document.createElement('div');
		message.textContent = 'https://example.com/link/' + number;
		space.appendChild(message);


    return event;
});

divではなくて aでは?

kintone.events.on('app.record.detail.show', event => {
    const record = event.record;
    const number = record['番号'].value;
    const space = kintone.app.record.getSpaceElement('space');

    const message = document.createElement('a');
    message.href = `https://example.com/link/${number}`;
    message.textContent = "表示文字列書き換える";
    space.appendChild(message);

    return event;
});
「いいね!」 1

このトピックはベストアンサーに選ばれた返信から 3 日が経過したので自動的にクローズされました。新たに返信することはできません。