I can’t figure out why my client script is not run...
# suitescript
c
I can’t figure out why my client script is not running? It’s very simple pageInit to console.log a message. The script is deployed with status release and All Roles.
Copy code
function pageInit(scriptContext) {
    console.log("TEST!")
}
k
send whole return script and deployment
c
k
what record type you deployed on ?
c
Copy code
<recordtype>JOB</recordtype>
d
are you opening the record in EDIT mode? client scripts don't fire in just VIEW mode as far as I recall
c
Oh really? There is no way to fire a client script in view mode?
d
yes by default when deploying to particular record I think that is correct. there are some hacks online involving attaching clientScript to userEventScript form on beforeLoad I believe - though not sure how useful depending on your usecase
c
I see, that makes more sense. Kind of an odd choice on Netsuite’s part to not allow it on view. Thanks anyways