Is `const` allowed in client script, could be the ...
# suitescript
s
Is
const
allowed in client script, could be the problem right there. Also there are no logs, how do you know it isnt firing?
m
Client scripts run in the browser so use browser JS engine which unless it's IE10 or something support const. They do go through validation on server side which is why you can't use ES6+ features yet (changing in the next release 🎉 ) but Rhino does recognize
const
(although it's behavior is not per spec)
🎉 1
a
You can do regular console.log and check the browser.