You have to use one of the functions provided by N...
# suitescript
j
You have to use one of the functions provided by NetSuite on the script record. Like beforeLoad, PageInit or whatever they are