At the moment you are capturing the onClick event/...
# suitescript
a
At the moment you are capturing the onClick event/action you went to the non-standard way and from there you have to use pure JavaScript