https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
c

Cory Weiner

04/20/2022, 7:03 PM
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

Kevin

04/20/2022, 7:14 PM
send whole return script and deployment
c

Cory Weiner

04/20/2022, 7:57 PM
k

Kevin

04/20/2022, 7:58 PM
what record type you deployed on ?
c

Cory Weiner

04/20/2022, 8:00 PM
Copy code
<recordtype>JOB</recordtype>
d

dbarnett

04/20/2022, 8:02 PM
are you opening the record in EDIT mode? client scripts don't fire in just VIEW mode as far as I recall
c

Cory Weiner

04/20/2022, 8:03 PM
Oh really? There is no way to fire a client script in view mode?
d

dbarnett

04/20/2022, 8:07 PM
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

Cory Weiner

04/20/2022, 8:08 PM
I see, that makes more sense. Kind of an odd choice on Netsuite’s part to not allow it on view. Thanks anyways
3 Views