I tried running your script using the console in m...
# suitescript
n
I tried running your script using the console in my browser but it returns an error.