Windchill customization, copy checkin comment to clipboard
Hi there,
the default behavior of windchill is, that if somethings goes wrong during checkin process, the checkin comment is lost.
So I tweaked <Windchill-installation>\codebase\templates\uwgm\cadx\checkin\checkintables.js a little to make a copy of the comment to a new window like:
var comment_window = window.open();
comment_window.document.writeln(comment);(I intentionally left all code out, which "prettifies" the new window)
works great!
Now I want to copy the comment directly to the clipboard.
But when I try this
// copy comment to clipboard
navigator.clipboard.writeText(comment)
.then(() => {
alert("successfully copied: " + comment);
})
.catch(() => {
alert("something went wrong");
});I get the error under Creo 8.0.6.0, "checkintables.js Uncaught TypeError: Cannot read properties of undefined (reading 'then')"
What am I doing wrong?

