sendVCRoutingRequest is declared and return {     ...
# suitescript
g
sendVCRoutingRequest is declared and return {         sendVCRoutingRequest: sendVCRoutingRequest,         beforeLoad: beforeLoad     } is what i return.
b
sendVCRoutingRequest()
is run client side in the browser
your user event is run serverside by netsuite's server
function's declared serverside are unavailable in the browser, they run in different places
Use Form.clientScriptModulePath to add your function client side
g
ty!
t
@battk allow me to piggyback off this question. Is there anyway to pass data from the client side to the suitelet? or do we have to post to the suitelet from the client side
b
im guessing you are making a suitelet which generates a form
t
yes
b
that form can have a submit button, which posts data back to the suitelet
t
so the function that i call on the clientside should post data back to the suitelet yh?
b
no
html has specific functionality around forms and submitting data.
you can also do what you suggested and make a function that makes an xhr/fetch to your suitelet
t
im trying the fetch on the clientside because that's the only way i can think of. because it could easily be triggered by the suitelet button
Thank you for all your answers so far
I think i'm just almost burnt out so my brain is running on fumes lol
b